I've been exploring ways to make money and am sick of the usual list of bad ideas - I've tried a bunch of these and...
How can I make YouTube videos responsive?
I have spent a lot of time and effort upgrading my website to make sure it is responsive for mobile devices. The problem is that I often need to embed other bits of media, in particular YouTube videos and these are fixed width.
Initially, I customized the embed code snippet to make the video default size small enough to fit on the smartphone width screen, but this looks ridiculous on a full sized page. By the same token, leaving a full sized video embedded on a responsive page breaks the layout because the video doesn't resize with the page.
In fact, Google Search Console began notifying me that many of my pages weren't mobile friendly in their Mobile Usability section. When I investigated I found that all the pages Google didn't like were ones that had YouTube videos embedded. They broke the smartphone layout so Google ended up reporting that the content was not properly sized to the viewport.
How can YouTube not provide responsive embed snippets? It's ridiculous. They're one of the biggest sites in the world. Surely they recognize the need for responsive layouts?
I know this is a long-shot because I don't expect you to be able to alter their IFRAME embed code, but is there any other way to make these videos responsive?
Found This Useful?
Share it on your own site using this quick link (and tell us about it in the comments so we can read your article too).
<a href="http://smepals.com/forums/development/how-can-i-make-youtube-videos-responsive">How can I make YouTube videos responsive?</a>