Sommerregen / grav-plugin-mediaembed

This plugin embeds several media sites (e.g. YouTube, Vimeo, Soundcloud) by only providing the URL to the medium.
Other
24 stars 8 forks source link

Responsive YouTube Loading Issues #3

Closed RyanMPierson closed 8 years ago

RyanMPierson commented 9 years ago

The preview image that appears seems slightly skewed on responsive settings. Once you click the giant play button it looks fine, but even with preview turned off it loads this skewed pane.

78d56ac6-f009-11e4-96af-7183497cc70f

77f3b612-f009-11e4-852c-8512ba17d710

Sommerregen commented 9 years ago

Hi FrugalGeek,

I'm aware of the issue. Actually this is a responsive: true issue. It will happen, when the mediaembed container is bigger than the media size (media.width/media.height). Sometimes this also happens when the iframe contains a width or height attribute. Since the media are embedded slight differently at the moment (because of different media types), I don't know how to solve it.

I need to parse at least the oembed.html attribute and modify there the iframes. The only workaround for now I can imagine is to set responsive: false and set a big width/height in media settings. Although responsive is switched off, the media will nevertheless shrink to the surrounding container size.