WIP: Bricks 2.2 object-fit: cover in Videos

After updating Bricks to 2.2, all my videos are no longer full screen. object-fit: cover can no longer be set for videos. How do I solve this problem?

1 Like

I noticed this too. It worked well in 2.2 rc.

As a temporary fix, you can set custom css on the video element

%root% video{
  object-fit:cover;
}

Hey @MarcoCzerny,

what do you mean that videos are not full-screen anymore? We did one change here, because previously the videos were “cut off” on fullscreen, so we only apply object-fit:cover if there is a poster visible. Otherwise we don’t.

That was the change that we made.

Matej

Hey Matej,
Thanks for the quick response and support! :slight_smile:
The video element previously filled the entire area with the “Cover” function. The video was cropped and cut off, but that was okay with me in this case.

Hey @MarcoCzerny,

thank you for this. I’ve created an internal improvement task, but until this one is implemented, please use the workaround that @ivo suggested (thanks and welcome to the forum @ivo :partying_face:)

Best regards,
Matej

Thanks @Matej ,

I am happy to help when I can.

1 Like

@Matej same issue! will be resolved in next bricks version?

Yes. We will add a toggle that will automatically apply object-fit:cover to the video. As for now, just use the CSS workaround :slight_smile:

Matej