Listening for events (Web Player)


JWP’s JavaScript Player API enables you to listen for specific changes to the player and return information about those changes. With this data, you can build your own analytics tracking or integrate with another system.

If your analytics service can receive information from the Javascript Player API, all API events can be tracked and measured. Please see our Web Player Reference for more information.



Listen for events

To listen for an event, follow these steps:

  1. Within your player implementation, listen for an event.
  2. Send the event data to a third-party analytics platform.

The following recipe shows a simple example of how to listen for the volume and mute events in an embedded player.



Listening event reference

The table below contains all events for which the JWP JavaScript Player API can listen. To see the complete information returned for each event, please visit our JavaScript API Reference.

💡

This table only references on events. All events listed can also use off, once, and trigger listeners.

You can build your analytics tracking around any of these listeners.

ClassEvents
Setup.on('ready')
.on('setupError')
Playlist.on('playlist')
.on('playlistItem')
.on('playlistComplete')
Buffer.on('bufferChange')
Playback.on('play')
.on('pause')
.on('buffer')
.on('idle')
.on('complete')
.on('error')
Seek.on('seek')
.on('seeked')
.on('time')
Volume.on('mute')
.on('volume')
Resize.on('fullscreen')
.on('resize')
Quality.on('levels')
.on('levelsChanged')
.on('visualQuality')
Captions.on('captionsList')
.on('captionsChange')
Controls.on('controls')
.on('displayClick')
Advertising.on('adClick')
.on('adCompanions')
.on('adComplete')
.on('adError')
.on('adImpression')
.on('adTime')
.on('adSkipped')
.on('beforePlay')
.on('beforeComplete')
Metadata.on('meta')
SharinggetPlugin('sharing').on('open')
getPlugin('sharing').on('close')
getPlugin('sharing').on('click')
RelatedgetPlugin('related').on('open')
getPlugin('related').on('close')
getPlugin('related').on('play')