-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
50 lines (42 loc) · 1.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<title>Video.js | HTML5 Video Player</title>
<link href="./js/videojs/video-js.min.css" rel="stylesheet">
<script src="./js/videojs/video.min.js"></script>
<script src="./js/videojs-playlist.min.js"></script>
<script src="./js/Youtube.min.js"></script>
</head>
<body>
<video id="player" class="video-js" controls autoplay muted preload="auto" width="854" height="480">
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video>
<script>
var player = videojs("player");
player.playlist([
{
sources: [{
src: 'https://www.youtube.com/watch?v=AZGcmvrTX9M',
type: 'video/youtube'
}]
},
{
sources: [{
src: 'https://www.youtube.com/watch?v=n4YXauObskA',
type: 'video/youtube'
}]
},
{
sources: [{
src: 'http://media.w3.org/2010/05/sintel/trailer.mp4',
type: 'video/mp4'
}],
poster: 'http://media.w3.org/2010/05/sintel/poster.png'
}
]);
// Play through the playlist automatically.
player.playlist.autoadvance(0);
player.playlist.repeat(true);
</script>
</body>
</html>