I am trying to get a fullscreen video to work on my site, but I am having trouble getting it to work on IE Edge and 11. If I add height:auto
to my class then it works correctly in IE and the video appears the full width, of the screen, but the layout is not ideal in Chrome ect, with this declaration as it adds a bunch of space at the bottom.
Is there a way to have height:auto
only be read by IE browsers and disregarded by Chrome, Firefox ect?
#video-wrapper,
#video {
position: absolute;
top: 0;
left: 0;
z-index: 1;
min-height: 100%;
min-width: 100%;
}
#video {
height: auto; /*only want this read by IE */
object-fit: cover;
}
HTML
<section id="video-wrapper">
<video autoplay muted loop id="video">
<source src="...">
</video>
</section>