YouTube player as3 API

Yesterday I played with flash a little after some longer time.
And I found out that google finally updated their YouTube player API to as3.

Some time ago, I ‘ve googled really interesting thing: google allow you to create your custom flash video player to play their content. No, by custom player i don’t mean just some color skin change of original YouTube player. I mean you can code your own controls, your own skin, design, everything.
By googling “custom youtube player” you will mainly find articles and reviews about how to change colors and how cool it is to have such a player on your website.
No it isn’t ! What’s cool is, that you can completely change it.

But at that time, they offered just as2 version, which was pretty lame and unusable in cs4 flash. There was some work around created by some flash developers, but whole idea how it works isn’t really good (I ll explain why later)
But as I found out yesterday, they finally updated this library to as3 !

Wohoo I sad, so lets have a look how it works.
(You will find here some of my notes about this API, you can find out more on the official documentation page)

Whole idea is based on the fact that you load .sfw file from and than you make calls via as to the player’s public API.

And here it comes, the fact why that as2/as3 mash ups APIs was lame is that their worked the same way but they got another .swf in the middle. Some kind of translator from as3 to as3 and backwards. So in your as3 scripts you called function what was processed by this middle file and it than called google API functions. That meant that you had to got this extra file (files) always with your flash.

But google finally change that, so happy coding !

One thought on “YouTube player as3 API

  1. Pingback: YouTube music player · gondo a jeho svet

Leave a Reply