This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Ruben van Gaalen
Posted Mar 31 - Read on Facebook

I just downloaded a free stock video with pre configured dimensions. Now I can edit it in after effects to make it the same dimensions as I want it to be in my Framer layer, but I was wondering if there is easier way. For example a function like 'cover' for an image in CSS. Thanks in advance for the help!

7 Comments

Ruben van Gaalen

You can ignore the code above videoLayer2*

Jonas Treub

I don't think there is a css "cover" alternative for videos. But if you keep the aspect ratio of the layer the same as the video you can scale it up as much as you like.

Jonas Treub

fillRatio = Screen.height / videoLayer.height
videoLayer.width *= fillRatio
videoLayer.height *= fillRatio
videoLayer.center()

Ruben van Gaalen

Fair enough. But still, it's not the scaling that's the problem, it's the bluebar in which it needs to be fitted. The other 3 pictures are static non-videos with predefined dimensions.

Jonas Treub

You mean that you still see part of the background color?

Jonas Treub

You can put the video layer inside another clipping layer with the clip property enabled and then make sure the video layer is at least as big as the clipping layer using the fillRatio code I posted earlier. Instead of Screen.height you should use clippingLayer.height

Ruben van Gaalen

Perfect, think that will work! Thank you!

Read the entire post on Facebook