Player ActionScript APIs (Player V2 Deprecated)

Player/Player UI ActionScript APIs can be used to handle aspects of the player such as fullscreen mode, player state, volume, playhead, player volume and video play length and status.

Player/Player UI Properties

Note: Ooyala Player V2 has been deprecated and is scheduled to be disabled. For details and alternatives, see the OVP Release Notes.
Note: This software is deprecated. Use the latest version.

The following table describes the ActionScript properties that are associated with a player.

Properties Description
activePanel

Returns info, channels, embed or syndication if the respective panel is currently shown.

Bindable

Format: read-only

description

The description of the player source.

Bindable

Format: read-only

fullscreen

Returns true if player is in fullscreen mode, false if not.

Bindable

Format: read-only.

Type: Boolean

Return Values: true | false

playheadTime

Returns current playhead position in seconds with millisecond accuracy.

Bindable

Format: read-write.

Type: Integer

Return Values: time in seconds

queryStringParameters

Parameters for the object.

Non-Bindable.

Format: write-only.

Type: String

Return Values:

state

Get current player state.

Return Values: One of playing, paused, buffering, channel, or error.

totalTime

Get the length of the active video (in seconds with millisecond accuracy).

Type: Integer

Return Values: duration in seconds

volume

Current volume as a number between 0 and 1 inclusive.

Bindable

Format: read-write.

Type: Integer

Return Values: numbers between 0 and 1 inclusive

Player/Player UI Event Handling

The following table describes the ActionScript events that are associated with player UI events.

Event Event Trigger Description
playheadTimeChanged( )

Update of active video play time.
activePanelChanged activePanel The Info, Embed, Share or Channel panel has been exposed or hidden.
apiReady This event is fired each time the player's embedCode is changed. The player is ready to receive API requests like playMovie(), getItem(), etc. Wait for this event to be dispatched before making any API calls. The embed code can be changed via setEmbedCode() or setQueryStringParameters(). Note: Applies to Version 2 and onward.
fullscreenChanged

Cancelable Examples: format (video), source (doubleClick), type (adStarted)

Full-screen state has been toggled.
loadComplete Player has been initialized. This is deprecated; use the apiReady event instead.  
metadataReady

metadata

The metadata property is an array of name/value pairs.

Type: array

Return Values: name/value pair has two properties: name and value.

Example: { name: "actor", value: "Johnny Depp" }

The metadata requested by the fetchMetadata() call is now ready.
playComplete The video or channel has completed playing.
ratingsApiReady The ratings API has loaded and is now ready for use. This event is dispatched after loadRatingsApi() is called.  
relatedMediaReady

The relatedMedia requested by the fetchRelatedMedia() call is now ready.

This event has a "relatedMedia" property which is an array of media items.

Type: Array

Return Values: Each item has a title, description, time, promo, and embedCode.

The related media requested by the fetchRelatedMedia() call is now ready.

seeked newPlayheadTime, oldPlayheadTime. A seek event happened in the player. This event can be triggered in two ways: a user moves the scrubber bar (note the event is registered when the user releases the scrubber bar), the API request setPlayheadTime is made.
stateChanged

Player state shift between playing, paused, buffering, or error.

The state has changed.  
totalTimeChanged

The current video's play length changed.

 
volumeChanged

The player volume was changed.

Related Information

The following list provides links to Backlot documentation that provides some general information about players.

Was this article helpful?