init
This commit is contained in:
38
web-test/index.html
Normal file
38
web-test/index.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
|
||||
<script src="https://cdn.dashjs.org/latest/dash.all.min.js"></script>
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/polyfill/v2/polyfill.min.js?features=es6,Array.prototype.includes,CustomEvent,Object.entries,Object.values,URL"></script> -->
|
||||
<script src="https://unpkg.com/plyr@3"></script>
|
||||
<link rel="stylesheet" href="https://cdn.plyr.io/3.7.8/plyr.css" />
|
||||
|
||||
<style>
|
||||
.container {
|
||||
margin: 50px auto;
|
||||
max-width: 1500px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<video controls playsinline></video>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const source = 'https://bitmovin-a.akamaihd.net/content/sintel/sintel.mpd';
|
||||
const dash = dashjs.MediaPlayer().create();
|
||||
const video = document.querySelector('video');
|
||||
dash.initialize(video, source, true);
|
||||
|
||||
const player = new Plyr(video, {captions: {active: true, update: true}});
|
||||
window.player = player;
|
||||
window.dash = dash;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user