YouTube announced yesterday in a post on the YouTube API Blog the introduction of a new embed code that utilizes the <iframe> tag to make it easier for viewers to watch an embedded video in either Flash or HTML5, depending on their settings and system configurations. Additionally, the new code will eventually allow embedded videos to play on mobile devices.
The new embed code looks as follows:
<iframe type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
The new embed code is not standard for the general public just yet, considering that it’s fully ready. Instead, YouTube is making the new style available to developers first.