Sample Code – Using the YouTube AS3 API with the YouTube Player API

Hi Everyone,

I have been absent for a while.. taking advantage of life. I also have switched to Android lately, doing some prototyping work with 80/20 Studio in NYC.

Someone from Belgium contacted me today about the YouTube AS3 API, so I decided to look into it once again. While browsing the Youtube API site I found that they have finally published a AS3 Player that can be used!! So here is some sample code on how to do it.

Warning, in the onPlayerError be sure to read what is coming out. Some videos (the first result from this sample search) are not allowed to be played on foreign sites (copyright content mostly).

Cheers!

2 thoughts on “Sample Code – Using the YouTube AS3 API with the YouTube Player API”

  1. Martin
    I do not want these restricted videos to be made available. How would I
    a) exclude them from the getVideos request
    and/or b) find the yt:state tag in the feed returned

    cheers

  2. Why don’t you implement to get a single video’s data, such as title, description etc.? I think it would be used often.

    Looking forward to the Flex version.

    respects

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">