YouTube: iFrame Embed Code Now Default to Share Videos, Introducing JavaScript Player API for iFrame Embeds

Google today announced that "Starting today, the <iframe> embed code is the default way to share videos on YouTube.com. And," also introducing an initial beta version of the <iframe> embed JavaScript Player API, making it a viable alternative for developers who previously used the API exposed by the ActionScript players."Let's look at an example of […]

Google today announced that "Starting today, the <iframe> embed code is the default way to share videos on YouTube.com. And," also introducing an initial beta version of the <iframe> embed JavaScript Player API, making it a viable alternative for developers who previously used the API exposed by the ActionScript players."

Let's look at an example of the API usage:

This example will play a video for several seconds and then stop playback. An instance of YT.Player is used to control the player, defined by script loaded from http://www.youtube.com/player_api .


[tags]iframe[/tags]

[Source]