YouTube's New Embedding Code

YouTube API Blog announces that YouTube will switch to a new embedding code that uses an iframe.
"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. In instances where HTML5 isn't supported (e.g. our HTML5 player can't play videos with ads), we use Flash."

An example of embed code:

<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>


YouTube says that "an additional benefit of the new embed style is that it will eventually allow embeds to work on mobile devices, which typically use a built-in player instead of Flash or HTML5." The new embedding code will allow YouTube to use the HTML5 video tag in browsers that support this feature.


Youtube API blog

Comments

Popular posts from this blog

Giveaway: Google Music Invites

Skype 2.25 and Qik Fliks Come to Windows Phone

Black Friday & Cyber Monday 2015