YouTube Switches To iframe Embed Tags For Videos

youtube_logoLooks like the new YouTube homepage was not the only changes rolled out by yesterday. In addition to the homepage changes, YouTube has also switched all video embed codes to use <iframe> instead of the older <object> embeds.

This was probably the first time I saw YouTube providing me with an iframe embed instead of the regular object embed code. However, this is not a new change and has been in test for a long time now. I came up with across various articles which have discussed this issue in the past six months or so.

youtube_iframe_embed_code

One of the discussions I found was on the YouTube API blog done back in July 2010. The post delved into the new iframe embed and explained to developers that the switch from object to iframe was to allow YouTube to display the video in either or Flash, based on the user’s browser capabilities. They also wrote a post on Jan 20, 2011 to say that the iframe tag was now the default embed tag.

If you use the new embed code style, your viewers will be able to view your embedded video in one of our Flash or HTML5 players, depending on their viewing environment and preferences. Environments that support the HTML5 video player are listed here on our HTML5 settings page. In instances where HTML5 isn’t supported (e.g. our HTML5 player can’t play videos with ads), we use Flash.

The move was apparently done so that the embedded videos would eventually work on mobile platforms that do not support Flash including the .  However, it looks like Google still has a lot of work to do since the video does not play on the iPhone even if you use the iframe embed tag.

Did you have any luck with playing YouTube videos on the iPhone, or while using the iframe embed tags?

  • Share

Related Topics Similar to This Article: »

Recent Activity: »

Read More On: , , ,

Comment Using Facebook

2 Responses to this Article | Share your Opinions/Comments

We moderate comments to prevent spam. Moderation is done within few hours. Please try and stay on topic and refrain from using abusive language. If you think there is a problem with this post, please email the post author or send us an email at tips@techie-buzz.com with the URL and the problem you see and we will rectify it as soon as we can.

  1. Johan on June 24th, 2011 at 7:45 am #

    Any news if youtube fixed the iframe for iPhone and iPad?