Setup Events

These API calls are used to create players and provide setup information.



.on('ready')

Signifies when the player has been initialized and is ready for playback. This is the earliest point at which any API calls should be made.

Returns an object with the following:

ValueDescription
setupTime number
Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β 
The amount of time (in milliseconds) for the player to go from setup() to ready.
viewable numberIf the player is viewable or not.


.on('setupError')

Fires when neither the player could be set up

{
    "code": 101101,
    "sourceError": null,
    "message": "Sorry, the video player failed to load.",
    "type": "setupError"
}
Property Description
code number Identifier for the error
message string Error text displayed displayed to the user

This property can be localized.
sourceError object | null Lower level error or event, caught by the player, which resulted in this error
type string Category of error or warning

This is always setupError for this event.


.on('remove')

Triggered when the player is taken off of a page via jwplayer().remove();

ValueDescription
-No value returned