I have a video with specific dimensions. When I first try to use it, the browser letterboxes the video at the sides (in an effort to maintain aspect ratio). I applied the object-fit: fill property and it worked for every browser I tested on except I.E. I even tried to use a polyfill (which seemed promising at first):( https://github.com/anselmh/object-fit) but I could not get it to work on the video. I have tried other techniques such as making a video wrapper class a scaling the video, but I could not do it without the video looking horrible. Does anyone have any idea how I can achieve this (possibly through JavaScript)? Here is some code:
.video{
height:1000px;
width:100%;
/*I tried doing this below but does not work in I.E.*/
/*object-fit: fill;
-o-object-fit: fill;
overflow: hidden;*/
}
/*I have also tried the following*/
/*.videowrapper {
position: relative;
width: 100%;
height: 1000px;
}
.videowrapper video {
width: 100%;
height: 100%;
-webkit-transform: scaleX(2); (I tried various scales but none of them looked good)
-moz-transform: scaleX(2);
-ms-transform: scaleX(2);
transform: scaleX(2);
}*/
<div class"=videowrapper">
<video id="video" class="video">
<source src=".../video.mp4" type="video/mp4" />
<source src=".../video.webm" type="video/webm" />
<source src=".../video.ogg" type="video/ogg" />
</video>
</div>
So is anyone aware of any creative JS/JQuery or even CSS methods I can possibly utilize to make this work? Thank you.