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')

Fired when neither the player could be set up.

Returns an object with the following:

ValueDescription
message string
Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β 
The error message that describes why the player could not be set up

.on('remove')

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

ValueDescription
-No value returned