Files
gander/web_server/blueprints/templates/video.html

27 lines
685 B
HTML

<html>
<body>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<video id="video" controls></video>
<script>
if(Hls.isSupported())
{
var video = document.getElementById('video');
var hls = new Hls();
hls.loadSource('{{ video_url }}');
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function()
{
video.play();
});
}
else if (video.canPlayType('application/vnd.apple.mpegurl'))
{
video.src = ' {{ video_url }}';
video.addEventListener('canplay',function()
{
video.play();
});
}
</script>
</body>
</html>