featherlight icon indicating copy to clipboard operation
featherlight copied to clipboard

Incorrect responsive behaviour when displaying a video

Open Freddixx opened this issue 10 years ago • 7 comments

Hi,

I don't know if this is a bug or if I misread the documentation somehow. I've been using featherlight a lot lately but this is a real headscratcher for me:

I'm dynamically adding a video to the lightbox using videojs. And the problem is that featherlight's scaling behaviour is a little odd, unless I add a hidden text (a h1 in this case). This looks strange to me. I prepared a fiddle to illustrate the problem:

http://jsfiddle.net/freddixx/oh313bcv/5/

The lightbox scales nicely if you comment in the line:

//playerContainer.appendChild(p);

I'd appreciate any help. I'm sure this is a simple thing once I know what's wrong here..

Freddixx avatar Dec 17 '14 00:12 Freddixx

Not too sure. Is this what you'd like?

marcandre avatar Dec 17 '14 01:12 marcandre

Yep, I'm having issues when using data-featherlight='iframe'. The Lightbox opens up and you can see the video in a tiny square in the center of the screen. I would really like it to scale up to fill the screen no matter the size and I've been poking at the code for a while now and can't figure out a good solution.

mrmwiebe avatar Sep 15 '15 21:09 mrmwiebe

bump

flywebguy avatar Dec 21 '15 19:12 flywebguy

+1

mfurlend avatar Apr 20 '16 20:04 mfurlend

This is another duplicate of #188

Or I guess it is a duplicate of this, since it's older. Either way, same issue.

robneu avatar Apr 20 '16 20:04 robneu

This is still occurring. Youtube videos seem to want to load at 300px wide.

CSobol avatar Feb 07 '17 16:02 CSobol

I also found that the default size of a video in an iFrame is 300 x 150.
In PR #353 I added some example code to the Readme that shows how to stretch a video to fill the window.

dbworth avatar Mar 31 '18 08:03 dbworth