Make player flex

This commit is contained in:
Alexandre Iooss 2020-10-18 18:25:18 +02:00
parent e51885aedc
commit ac5fc7a33b
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
3 changed files with 8 additions and 23 deletions

View File

@ -1,18 +1,9 @@
/* Player */
.video-responsive {
position: relative;
padding-top: 56.25%; /* 16/9 */
}
video {
display: block;
flex-grow: 1;
.video-responsive video {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
/* Black borders when video is not 16/9 */
/* Black borders around video */
background-color: #000;
}
@ -22,6 +13,7 @@
padding: 0.2rem 0.5rem;
color: rgb(187, 187, 187);
user-select: none;
text-align: right;
}
.control-quality,

View File

@ -43,20 +43,15 @@ h1, h2, h3, h4 {
.container {
height: 100%;
width: 100%;
display: flex;
flex-wrap: wrap;
height: 100%;
}
.col-video {
flex-basis: 0;
flex-grow: 1;
text-align: right;
/* Limit max width to limit video size */
margin: auto;
max-width: 1200px;
display: flex;
flex-direction: column;
}
.col-chat {

View File

@ -2,9 +2,7 @@
<div class="container">
<div class="col-video">
<!-- Video -->
<div class="video-responsive">
<video id="viewer" poster="{{.Cfg.PlayerPoster}}" muted controls autoplay></video>
</div>
<video id="viewer" poster="{{.Cfg.PlayerPoster}}" muted controls autoplay></video>
<!-- Links and settings under video -->
<div class="controls">