upgrade index.html to use hls.js
parent
2950158e81
commit
ff52b81ce3
@ -1,9 +1,17 @@
|
||||
<html>
|
||||
<link rel="shortcut icon" href="about:blank"/>
|
||||
<body>
|
||||
<video controls>
|
||||
<source src="unicast.mpd">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
<video controls id="video"></video>
|
||||
<script src="https://cdn.jsdelivr.net/hls.js/latest/hls.js" ></script>
|
||||
<script>
|
||||
if (Hls.isSupported()) {
|
||||
var video = document.getElementById("video");
|
||||
var hls = new Hls();
|
||||
hls.loadSource("unicast.m3u8");
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, function() { video.play(); });
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Loading…
Reference in New Issue