I am building a website that has a video swiper as banner (swiper.js).
On chrome both on desktop and android everything is fine, the video stretches to fill the height and respects the object-fit: fill
.
print of the banner in desktop
But on safari, the video doesnt reach full height, and the container is left with some blank space.
my current code is
&__video {
position: absolute;
top: 0;
left: 0;
width: 100%;
min-height: 100%;
object-fit: fill;
z-index: -2;
}
i've found a solution for the blank space, but in doing so the video will not center(there are some icons embeded in the video that need to appear in the center)
the solution was:
&__video {
position: absolute;
top: 0;
left: 0;
min-height: 100%;
min-width: 100%;
height: auto !important;
width: auto !important;
object-fit: fill;
z-index: -2;
}
so yeah i need some help to keep the video centered (preferably "sqwishing" the video instead of some overflow hidden, but if not its ok too)