Making a site that loads a random webms in full (browser) screen every time the page is loaded. Problem is I have videos of various sizes (portrait, square, widescreen etc) and don't know how to make them all play without cropping too much.
Basically I want them all to play full screen, portrait video play center screen so it can clearly be seen, square can be stretched as long as its clear etc. Here's the CSS I was given.
html, body {
margin: 0;
overflow: hidden;
}
#my-video {
position: absolute;
min-width: 100%;
min-height: 100%;
top: 0;
left: 50%;
transform: translateX(-50%);
}
I've also been told to use jquery-3.1.0 but I'm not sure how that works. Thanks!