-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
28 lines (24 loc) · 1.18 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
<!DOCTYPE html>
<html>
<head>
<title>HLS Video Player</title>
<link href="https://unpkg.com/video.js@7/dist/video-js.min.css" rel="stylesheet">
<link href="https://unpkg.com/[email protected]/dist/css/quality-selector.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@7/dist/video.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-quality-levels/2.0.9/videojs-contrib-quality-levels.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-hls-quality-selector.min.js"></script>
</head>
<body>
<video id="videojs" class="video-js vjs-fluid vjs-default-skin vjs-big-play-centered" controls preload="auto" autoplay fluid="true" liveui="true">
<source src="master_m3u8_file_url" type="application/x-mpegURL">
<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 type="text/javascript">
var player = videojs('videojs');
player.hlsQualitySelector();
</script>
</body>
</html>