Assets ActionScript APIs can be used to handle ratings, videos (play/pause, describe), and channels.
Get an array of objects describing the current channel.
Return Values: channel description
Get the title of the current channel or video if no channel.
Return Values: channel title | video title
Examples: My Snowboarding Channel
Returns true when a user is allowed to assign a rating to the current item. Returns false if a user previously used the current device to rate the item.
Values: true | false
Get an object describing the current video. The returned Object includes embedCode, title, description, time (play length in seconds), lineup, promo, and hostedAtURL.
Return Values: Item description
Get the average rating given to the item.
Values: numeric average
Example: Given ratings (1, 7, 14, 0, 2, 22, 6, 0), returns 6.5
Get the description of the current video.
Return Value: text describing the current asset.
Example: "snowboarding competition"
Get the rating distribution for the current item. This returns an array of integers where each integer represents the number of times a certain rating has been given to the item.
Type: Integer array
Example: [0, 16, 0, 0, 0, 0, 0, 0, 25, 0, 0] indicates that the item has 16 votes for "1" and 25 votes for "8".
Get the title of the current video.
Return Value: alphanumeric
Example: "X Games"
Get the length of the active video in seconds.
Return Values: (seconds with millisecond accuracy).
Increments the rating for the current item. rating can be an integer from 0-10. If this computer has rated this item before, calling this function will have no effect.
Valid Values: an integer from 0-10.
|loadRatingsApi()||Loads the Ratings API. The Ratings API should be loaded before calling any of the ratings API functions, like incrementCurrentItemRating() and getCanRateCurrentItem(). The ratingsApiReady event is dispatched when the API is ready for use.|
|pauseMovie()||Pause the current video|
Play the current video.
The following list provides links to background information on Ooyala Backlot that is related to Player assets.