2.2.0
Google Analytics tracking for MediaEvents
(any)
Stores the category and label pair as an object in the array of pairs for the MediaStart event. These are the pairs of category and label that should be tracked to when the event occurs
Stores the category and label pair as an object in the array of pairs for the MediaStop event. These are the pairs of category and label that should be tracked to when the event occurs
Stores the category and label pair as an object in the array of pairs for the all Media events. These are the pairs of category and label that should be tracked to when the event occurs
An interface for binding to and interacting with an embedded PBS player
Extends PBSMediaEvents
(object?
= {}
)
Passes to PBSMediaEvents. See constructor.
Installs a plugin into the list of default plugins to load for future instances of PBSPlayers
Triggers media events based on the messages sent from a PBS Player
Extends PBSMessageAPI
(object?
= {}
)
Passes to PBSMessageAPI. See constructor.
Destroys the messaging channel for the PBSMessageAPI so that the event handler that traps messages does not exist continually. Removes all bound events from the underlying player element
Requests the currently playing player's duration in seconds.
Promise<int>
:
Requests the player's current audio muting state.
Promise<boolean>
:
Requests the current playback position in seconds.
Promise<int>
:
Requests the player's current playback state.
Promise<(string | null)>
:
Requests the current playback volume percentage, as a number from 0 to 100.
Promise<int>
:
Helper method to check if the player is at the end of a video
Promise<boolean>
:
Helper method to check if the player is in the play state
Promise<boolean>
:
Helper method to check if the player is currently seeking
Promise<boolean>
:
Simple proxy method for unbinding events
(String)
The name of the event to unbind from
(Function)
The function to unbind from the event
PBSMessageAPI
:
Simple proxy method for binding events
PBSMessageAPI
:
Requests that the player changes to the paused state. Resolves to null.
Promise<null>
:
Requests that the player changes to the playing state. Resolves to null.
Promise<null>
:
Jump to the specified position within the currently playing item. The position is required and must be provided as an integer, in seconds.
(Number)
The position to seek to
Promise<null>
:
Change the player's mute state (no sound). Toggles between muted and not muted.
(Boolean)
Promise<null>
:
Sets the player's audio volume percentage, as a number between 0 and 100.
(Number)
The volume to set the player to
Promise<null>
:
Stops the player (returning it to the idle state) and unloads the currently playing media file.
Promise<null>
:
Requests that the player toggle the play state. If the player is in the playing state, it should switch to the paused state. If the player is in the paused state it should switch to the playing state. Resolves to null.
Promise<null>
:
Simple proxy method for unbinding events
(String)
The name of the event to unbind from
(Function)
The function to unbind from the event
PBSMessageAPI
: