YouTube Switches To iframe Embed Tags For Videos
By on January 22nd, 2011

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?

Tags: , , ,
Author: Keith Dsouza Google Profile for Keith Dsouza
I am the editor-in-chief and owner of Techie Buzz. I love coding and have contributed to several open source projects in the past. You can know more about me and my projects by visiting my Personal Website. I am also a social networking enthusiast and can be found active on twitter, you can follow Keith on twitter @keithdsouza. You can click on my name to visit my Google+ profile.

Keith Dsouza has written and can be contacted at keith@techie-buzz.com.

Leave a Reply

Name (required)

Website (optional)

 
    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'advanced_comment' not found or invalid function name in /home/keith/techie-buzz.com/htdocs/wp-includes/comment-template.php on line 1694
 
Copyright 2006-2012 Techie Buzz. All Rights Reserved. Our content may not be reproduced on other websites. Content Delivery by MaxCDN