Youtube Data API AS3 – YouTubeClient functions & associated events.

Hi Everyone,

Before I begin, these are past posts on the same subject:

and the API can be found here: http://code.google.com/p/as3-youtube-data-api/

Today I will describe what events are associated with each YouTubeClient function call. I will also describe which Feed / Data Object is passed inside the said event. Please note that :

  • Events are in the ca.newcommerce.youtube.events package
  • Feeds are in the ca.newcommerce.youtube.feeds package
  • Data Obects are in ca.newcommerce.youtube.data package

YouTubeClient.getStandardFeed(…)

  • Event: StandardVideoFeedEvent.STANDARD_VIDEO_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getVideos(…)

  • Event: VideoFeedEvent.VIDEO_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getUserProfile(…)

  • Event: ProfileEvent.PROFILE_DATA_RECEIVED
  • .profile: ProfileData

YouTubeClient.getUserFavorites(…)

  • Event: VideoFeedEvent.USER_FAVORITES_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getUserSubscriptions(…)

  • Event: SubscriptionFeedEvent.SUBSCRIPTION_DATA_RECEIVED
  • .feed: SubscriptionFeed

YouTubeClient.getUserPlaylists(…)

  • Event: PlaylistFeedEvent.PLAYLIST_DATA_RECEIVED
  • .feed: PlaylistFeed

YouTubeClient.getUserContacts(…)

  • Event: ContactFeedEvent.USER_DATA_RECEIVED
  • .feed: ContactFeed

YouTubeClient.getRelatedVideos(…)

  • Event: VideoFeedEvent.RELATED_VIDEOS_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getVideoComments(…)

  • Event: CommentFeedEvent.COMMENT_DATA_RECEIVED
  • .feed: CommentFeed

YouTubeClient.getVideoResponses(…)

  • Event: ResponseFeedEvent.RESPONSES_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getPlaylist(…)

  • Event: VideoFeedEvent.VIDEO_PLAYLIST_DATA_RECEIVED
  • .feed: VideoFeed

Ok I think that’s it.. I will do another tutorial in a few days. :)

Cheers,

Martin

7 thoughts on “Youtube Data API AS3 – YouTubeClient functions & associated events.

  1. Hello

    I am using this AS3 class library load youtube thumbnail images into my flash interface. Now everything is working fine If I am running this on my computer locally but once I upload it to a live webserver it doesnot load the thumbnail images.

    Any idea of why this is not working is this something to do with AS3 security sandbox or other security related isseues?

    Thanks for your help in advance

  2. Any plans to extend the library to handle adding videos to YouTube via upload? Is this even possible from Flash/Flex?

  3. Hi,
    i’m tring to use your as3 library, and in general works fine.
    But i can’t use getUserProfile method. I recive this error

    ReferenceError: Error #1069: Impossibile trovare la proprietà $t su Number e nessun valore predefinito presente.
    at ca.newcommerce.youtube.data::AbstractData/fromObj()
    at ca.newcommerce.youtube.data::FeedLinkData/get countHint()
    at ca.newcommerce.youtube::DataTracer$/traceFeedLink()
    at ca.newcommerce.youtube::DataTracer$/traceFeedLinks()
    at ca.newcommerce.youtube::DataTracer$/traceProfile()
    at ca.newcommerce.youtube::Test/doProfileReady()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at ca.newcommerce.youtube.webservice::YouTubeFeedClient/doProfileLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    I’m not very skilled in as3 like you and a don’t understand what is $t property.
    Can you halp me?
    Thanks a lot.

  4. Hi Martin,

    First of all I would like to thanks a ton to you for this extremely creative project of youtube as3 data api library which is actually making us capable of developing the app using the youtube data api . I am an app developer from India and I am trying to build an app ( basically for testing)which uses this youtube as3 data api library . What I am doing in app is that making user log-in with the gmail id and password and then app is trying to fetch the user ‘s profile,
    favorites and playlist but for all these functions getUserPlaylists , getUserFavorites and getUserProfile , you have to provide the “username” and there is no function in the library by which I can retrieve the username by providing the gmail id of the user and hence my app is failing . Can you please help me with this so that I can retrieve the username or can you tell me another workaround for this ?

    I would be grateful if you can help

    Thanks in advance!

Leave a Reply

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

* Copy This Password *

* Type Or Paste Password Here *

55,247 Spam Comments Blocked so far by Spam Free Wordpress

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