v4l2rtspserver/index.html
2019-03-31 14:34:58 +00:00

23 lines
627 B
HTML

<html>
<link rel="shortcut icon" href="about:blank"/>
<body>
<!--fill streamList variable with the list of streams -->
<script src="/getStreamList?streamList" ></script>
<h3>HLS</h3>
<video controls id="hlsvideo"></video>
<script src="hls.js/dist/hls.light.min.js" ></script>
<script>
if (Hls.isSupported()) {
var video = document.getElementById("hlsvideo");
var hls = new Hls();
hls.loadSource(streamList[0]+".m3u8");
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function() { video.play(); });
} else {
document.write("HLS not supported");
}
</script>
</body>
</html>