Object: Player

Video player app. Will select an appropriate video adapter depending on the client (e.g. flash or html5) as well as create a Playlist from which to fetch content.
Parameters:
Name Type Description
config Object Player configuration properties will be passed to the playlist
Properties:
Name Type Description
adapter Object References the video adapter in use
playlist Object References the Playlist in use
beacon Object jQuery object that broadcasts various events
currentPlaylistItem Object Stores 2nd level item data, where playlist.getCurrentItem() stores 1st level item data
config Object The app configuration properties with defaults applied
adapterType String The type of playback adapter created for this player: 'HTML5Player', 'FlashPlayer', 'TestPlayer'

Methods

Breaks functionality and attempts to remove references

Start or resume playback

Pause playback

Stop playback and load the current playlist item

Mutes audio playback

Unmutes audio playback

Returns:
boolean value

Returns:
boolean value

Get the current playback position of the loaded video
Returns:
The position in seconds
Type:
Number

Get total playback time of the loaded video
Returns:
The time in seconds
Type:
Number

Get playback volume
Returns:
A real number ~[0,1]
Type:
Number

Seek to some point of the loaded video. Note: the flash adapter may have to buffer the entire video
Parameters:
Name Type Description
val Number The target time in seconds
Set the item index of the current playlist and reload content
Parameters:
Name Type Description
index Number Target item index (zero based)
Add a new playlist and reload content
Parameters:
Name Type Description
url The playlist url
Set playback volume
Parameters:
Name Type Description
vol Number A real number ~[0,1]

Events

Triggered when the player buffers a portion of the ad media source

Note: In Version 1.9, available in HTML5 only.
Parameters:
Name Type Description
config Object
percent Number An integer value [0,100] representing the total amount of media source that is buffered
Triggered when an ad video ends
Parameters:
Name Type Description
config Object
Triggered when an ad fails
Parameters:
Name Type Description
config Object
Triggered when ad data is loaded
Parameters:
Name Type Description
config Object
adData Object
Triggered when an ad video is paused
Parameters:
Name Type Description
config Object
Triggered immediately after player.play(), before adStart

Note: In Version 1.9, available in HTML5 only.
Parameters:
Name Type Description
config Object
Triggered when an ad video begins after buffering
Parameters:
Name Type Description
config Object
Triggered approximately every 250ms during ad playback

Note: In Version 1.9, available in HTML5 only.
Parameters:
Name Type Description
config Object
current Number Current position of the video in seconds
duration Number Total run time of the video in seconds
Triggered when ad is clicked.

Note: Available in Flash only.
Parameters:
Name Type Description
config Object
Triggered approximately every 250ms during playback
Parameters:
Name Type Description
config Object
code Number An error code used for internal tracking
msg String A helpful message
Triggered when the player is ready for interaction
Parameters:
Name Type Description
config Object
Triggered when the player is resized

Note: In Version 1.9, available in HTML5 only.
Parameters:
Name Type Description
config Object
Triggered when the player seeks to a new point in the video
Parameters:
Name Type Description
config Object
seconds Number
Triggered when the player buffers a portion of the media source

Note: In Version 1.9, available in HTML5 only.
Parameters:
Name Type Description
config Object
percent Number An integer value [0,100] representing the total amount of media source that is buffered
Triggered when a content video ends
Parameters:
Name Type Description
config Object
nextItem Object Data for the next video to be played
Triggered when a new content video is loaded
Parameters:
Name Type Description
config Object
item Object The item data
Triggered when a content video is paused
Parameters:
Name Type Description
config Object
Triggered immediately after player.play(), before videoStart

Note: In Version 1.9, available in HTML5 only.
Parameters:
Name Type Description
config Object
Triggered when a content video is started or resumed after buffering
Parameters:
Name Type Description
config Object
Triggered approximately every 250ms during playback

Note: In Version 1.9, available in HTML5 only.
Parameters:
Name Type Description
config Object
current Number Current position of the video in seconds
duration Number Total run time of the video in seconds