hls: set html video height to 100%

This commit is contained in:
aler9 2021-08-23 12:33:09 +02:00
parent 92523c2a13
commit 6d69e4969e
1 changed files with 5 additions and 6 deletions

View File

@ -32,13 +32,12 @@ const index = `<!DOCTYPE html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<style> <style>
#video-wrapper { html, body {
width: 100%; margin: 0;
padding-bottom: 56.25%; padding: 0;
position: relative; height: 100%;
} }
#video { #video {
position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: black; background: black;
@ -47,7 +46,7 @@ const index = `<!DOCTYPE html>
</head> </head>
<body> <body>
<div id="video-wrapper"><video id="video" muted controls autoplay></video></div> <video id="video" muted controls autoplay></video>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1.0.0"></script> <script src="https://cdn.jsdelivr.net/npm/hls.js@1.0.0"></script>