forked from mpromonet/v4l2rtspserver
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
25 lines (24 loc) · 784 Bytes
/
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
<html>
<link rel="shortcut icon" href="about:blank"/>
<body>
<h3>HLS</h3>
<video controls id="hlsvideo"></video>
<script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js" ></script>
<script>
if (Hls.isSupported()) {
var video = document.getElementById("hlsvideo");
var hls = new Hls();
hls.loadSource("unicast.m3u8");
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function() { video.play(); });
}
</script>
<h3>MPEG-DASH</h3>
<video controls id="dashvideo"></video>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.5.0/dash.all.min.js" ></script>
<script>
var player = new dashjs.MediaPlayer().create();
player.initialize(document.getElementById("dashvideo"),"unicast.mpd",true);
</script>
</body>
</html>