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 See: 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. Broadcasts various events
currentPlaylistItem Object Stores 2nd level item data, where playlist.getCurrentItem() is only 1st level
src String The currently loaded media URI
config Object The app configuration properties with defaults applied
stageMode Number 0 firing no stage events, 1 firing .Content events, 2 firing .Ads events
dfd Object jQuery deferred. Resolves when both the playlist and adapter are ready.
adapterType String The type of playback adapter created for this player: 'HTML5Player', 'TestPlayer', 'FlashPlayer', 'SamsungPlayer', 'Player182'

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:
Type boolean
Returns:
1 Type boolean
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
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 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
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
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 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
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
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
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
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