humanmade / protected-embeds

A drop-in replacement for WordPress.com protected embeds
11 stars 4 forks source link

Responsive iframes #10

Open roborourke opened 8 years ago

roborourke commented 8 years ago

Would be good to look into making the iframes resize nicely for small/larger screens etc... there's a vanilla js version of fitvids that might be usable in conjunction with the postmessage code.

joehoyle commented 8 years ago

Hmm I thought this was already done? Unless I'm missing something, it passes the height to the parent, or is this somethign else?

roborourke commented 8 years ago

They are to some extent just not in a way that means the initial embed can take up all the available space if that makes sense. You don't get the automatic intrinsic height calculation as you do with fitvids for example so a video will always be 315px tall on desktop and mobile for example

On 19 July 2016 at 13:32, Joe Hoyle notifications@github.com wrote:

Hmm I thought this was already done? Unless I'm missing something, it passes the height to the parent, or is this somethign else?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/humanmade/protected-embeds/issues/10#issuecomment-233605582, or mute the thread https://github.com/notifications/unsubscribe-auth/AABbeVy3sZDq4_z1jEjBptgSFIKrWnMAks5qXLXagaJpZM4JPUBy .

Robert O'Rourke Senior WordPress Engineer humanmade

phone: +447816329424 email: rob@hmn.md skype: rob.o.rourke twitr: @sanchothefat https://twitter.com/sanchothefat

joehoyle commented 8 years ago

Hmm I see. From the iframe's perspective it's say, 300 pixels wide, and say 600px tall. However, I don't actually know what the initial height of the iframe is. But, even if we know that, if you say have an embed that will be "fullscreen" in the iframe, I'm not sure of the best way to control / hint what size it should be, as I think that's not a solvable problem, unless we make it by default 4:3 ratio or somethign like that.