Specify video height in html so page doesn't shift down after load

Use true video height extracted from youtube to handle videos
shorter than their quality size. (e.g. widescreen videos)
This commit is contained in:
James Taylor
2020-09-24 18:50:54 -07:00
parent 9f0d84ddb9
commit 20152a6316
3 changed files with 19 additions and 12 deletions

View File

@@ -54,7 +54,6 @@
justify-self: center;
max-width: 100%;
width: {{ theater_video_target_width }}px;
max-height: {{ video_height }}px;
margin-bottom: 10px;
background-color: var(--video-background-color);
}
@@ -339,7 +338,7 @@ Reload without invidious (for usage of new identity button).</a>
</ol>
</div>
{% else %}
<video controls autofocus class="video">
<video controls autofocus class="video" height="{{ video_height }}px">
{% for video_source in video_sources %}
<source src="{{ video_source['src'] }}" type="{{ video_source['type'] }}">
{% endfor %}