If you are looking to embed a YouTube video on your website, there’s one important step you must take so it plays properly on the iPhone and iPad.
Quick Background: Because Steve Jobs hates Flash, and most web videos were originally encoded in Flash, many web videos won’t play on Apple’s iOS devices, which means the iPhone and iPad. Fortunately the YouTube player on these devices can detect a Flash video and play it automagically. But only if you use the correct embed code.
To embed a YouTube video, click the Share button on the left beneath the video on the YouTube.com website:
A panel appears with the video’s link. Click the Embed button on the bottom left:
A text box opens with the embedding code. But by default (as of this writing) this code uses <iframe> and will not show on the iPhone and iPad. Users may hear the video but won’t see it. Or nothing will happen at all.
One Important Step
But you can easily solve this problem in the options below the embed code. And since YouTube remembers your options, make this change just once, and you will always receive the correct code in the future.
Important Step: Check the Use old embed code box at the bottom of the options list, as shown:
The old embed code uses <object>, which works perfectly on the iPhone and iPad. The YouTube player detects the code, pops up, goes full screen, and plays the Flash video:
Note the information in this article and the YouTube screens are correct as of this writing, but websites are subject to change frequently. Here’s a good video that goes into more detail about properly embedding Vimeo and YouTube videos.
Following is my favorite video so far, and it will warm your heart and make your day. If you have 8 minutes and want to see a selfless act of human kindness, followed by an incredible show of grace and thanks by a giant of the sea, check out this video:
Article published on August 2, 2011
|If you like this article, please share it:|