jquery-object-fit icon indicating copy to clipboard operation
jquery-object-fit copied to clipboard

Freezes FF and doesn't work

Open thany opened this issue 10 years ago • 2 comments

I've implemented it like so:

$(".content-promo .slideshow video").objectFit({ type: "cover", hideOverflow: true });

In FF 35, it doesn't have any effect. Also, resizing the screen makes slows the browser down more and more and more, and then freezes. The video in question is absolutely positioned to 100% of the width&height of the viewport.

thany avatar Jan 15 '15 12:01 thany

This plugin is designed to work with images, rather than videos. As far as I know, Videos already have a way to keep the aspect ratio correct built-in to the browser.

Have you got an example I can take a look at (JS Fiddle or something)

steveworkman avatar Jan 16 '15 09:01 steveworkman

Sorry, for this particular case, I can't easily extract it into a Fiddle.

So no videos? Hm. Yes they already keep aspect ratios alright. But they always follow the "contain" principle, where I'm looking to get them to follow the "cover" principle. object-fit does this very nicely on Chrome & its sisters, but FF and IE are still lacking this. Which is why I came across this script ;)

thany avatar Jan 16 '15 09:01 thany