From 9cbe348310312407fe2bf1d94b4008bda8735281 Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 14 Jun 2020 18:15:53 +0200 Subject: [PATCH] object-fit:cover for video poster note that this only works because the video element has the exact proportions of the video file. --- app/static/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/static/style.css b/app/static/style.css index 5521fc0..0cd0782 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -116,6 +116,11 @@ ul#submgr{list-style: none} .main-video { width: 100%; } +.main-video video { + object-fit: cover; + /* affects both placeholder and src. To avoid cropping the video itself, we + assume the video element's aspect ratio exactly matches the video file. */ +} /* https://stackoverflow.com/a/20201563 */ .aspect-ratio { position: relative; -- 2.39.3