-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
48 lines (39 loc) · 1.26 KB
/
index.html
File metadata and controls
48 lines (39 loc) · 1.26 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HLS Stream Test</title>
<link href="https://vjs.zencdn.net/8.6.1/video-js.css" rel="stylesheet" />
<!-- HLS Quality Selector Plugin CSS (optional, mostly for themes) -->
<style>
.vjs-menu-button-popup .vjs-menu { max-height: 200px; overflow-y: auto; }
</style>
</head>
<body>
<h1>HLS Video Streaming Test with Resolution Selector</h1>
<video
id="my-video"
class="video-js vjs-default-skin"
controls
preload="auto"
width="640"
height="360"
data-setup="{}">
<source src="http://localhost:8080/hls/a068e699-1100-436f-87b1-b0f30b7c9247_master.m3u8" type="application/x-mpegURL" />
Your browser does not support HTML5 video.
</video>
<!-- Video.js Core -->
<script src="https://vjs.zencdn.net/8.6.1/video.min.js"></script>
<!-- HLS Quality Selector Plugin -->
<script src="https://cdn.jsdelivr.net/npm/videojs-hls-quality-selector@1.1.3/dist/videojs-hls-quality-selector.min.js"></script>
<!-- Initialize Video.js Player with Resolution Selector -->
<script>
const player = videojs('my-video');
player.ready(function () {
player.hlsQualitySelector({
displayCurrentQuality: true
});
});
</script>
</body>
</html>