2016-05-21 17:02:54 +00:00
|
|
|
<html>
|
2016-06-04 17:36:31 +00:00
|
|
|
<link rel="shortcut icon" href="about:blank"/>
|
2016-05-21 17:02:54 +00:00
|
|
|
<body>
|
2017-09-03 15:44:33 +00:00
|
|
|
<!--fill streamList variable with the list of streams -->
|
|
|
|
<script src="/getStreamList?streamList" ></script>
|
2017-06-03 12:20:42 +00:00
|
|
|
<h3>HLS</h3>
|
|
|
|
<video controls id="hlsvideo"></video>
|
2017-09-11 19:44:56 +00:00
|
|
|
<script src="hls.js/dist/hls.light.min.js" ></script>
|
2016-06-04 17:36:31 +00:00
|
|
|
<script>
|
|
|
|
if (Hls.isSupported()) {
|
2017-06-03 12:20:42 +00:00
|
|
|
var video = document.getElementById("hlsvideo");
|
2016-06-04 17:36:31 +00:00
|
|
|
var hls = new Hls();
|
2017-09-03 15:44:33 +00:00
|
|
|
hls.loadSource(streamList[0]+".m3u8");
|
2016-06-04 17:36:31 +00:00
|
|
|
hls.attachMedia(video);
|
|
|
|
hls.on(Hls.Events.MANIFEST_PARSED, function() { video.play(); });
|
2017-09-03 15:44:33 +00:00
|
|
|
} else {
|
|
|
|
document.write("HLS not supported");
|
2016-06-04 17:36:31 +00:00
|
|
|
}
|
|
|
|
</script>
|
2017-09-03 15:44:33 +00:00
|
|
|
<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"),streamList[0]+".mpd",true);
|
2017-09-03 20:19:25 +00:00
|
|
|
</script>
|
2016-05-21 17:02:54 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|