Moved frontend out of webserver into it's own container
This commit is contained in:
27
web_server/blueprints/templates/video.html
Normal file
27
web_server/blueprints/templates/video.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user