Sudden OEmbed problem
-
I’m not sure when this happened, since I just noticed it, but I’m assuming it arrived with either WordPress 4.4, 4.4.1, or 4.4.2.
Youtube OEmbeds used to “just work” with something like this on a single line:
https://youtu.be/4n3g5lUgkWk?html5=1&autoplay=0&rel=0
The video was responsive and sized appropriately for the platform/view port.
Now suddenly the same OEmbed code results in a tiny, postage stamp-sized video. I’ve noticed the following crap when I view source on a page with a Youtube OEmbed:
<iframe width="200" height="113" src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-lazy-src="https://www.youtube.com/embed/Jo4zMDoTxiw?feature=oembed" frameborder="0" allowfullscreen></iframe>
Obviously, the OEmbed Youtube video is no longer responsive and looks like postage-stamp crap on every device.
When did this happen? Has anyone else noticed this behavior? Where is the iframe width and height values being brought in from?
Please advise.
Thanks.
-
Crickets for three weeks. Really?
Here’s an additional datapoint that makes me think this is a WordPress 4.x core problem.
Enabling and using the Jetpack Shortcode Embed module and using it’s embed code actually works as expected (appropriately sized and fully responsive):
Instead of WordPress’s core oEmbed:
https://youtu.be/4n3g5lUgkWk?html5=1&autoplay=0&rel=0
If I use Jetpack’s Shortcode embed (after enabling the Jetpack Shortcode Embed module, natch):
[youtube https://youtu.be/4n3g5lUgkWk?html5=1&autoplay=0&rel=0]
It works as expected. And when I view source on the page with the Jetpack shortcode embed, it seems much more reasonable:
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-lazy-src='http://www.youtube.com/embed/Jo4zMDoTxiw?version=3&rel=0&fs=1&autohide=2&showsearch=0&showinfo=1&iv_load_policy=1&wmode=transparent' frameborder='0' allowfullscreen='true'></iframe></span>
Anyone have any ideas about this.
I’ve just now managed to resolve this. For some reason, if I use the WordPress core oEmbed method, e.g., https://youtu.be/4n3g5lUgkWk?htm5=1&autoplay=0&rel=0, on a line by itself, even with all plugins disabled, I get postage-stamp sized video window regardless of screen or viewport dimensions.
If, however, I enable Jetpack’s Shortcode Embed module, the WordPress core oEmbed method displays as expected based on screen or viewport dimensions. This is without using the Jetpack Shortcode Embed method, i.e., [youtube https://youtu.be/4n3g5lUgkWk?htm5=1&autoplay=0&rel=0%5D on a line by itself.
I can’t begin to explain or understand this, but I guess it’s resolved.
- The topic ‘Sudden OEmbed problem’ is closed to new replies.