<player> JS Events

You can be notified when events occur in your <player> using our Javascript API. Below is a full list of the available events.

How do I observe camera events?
loadstart
loaderror
loadedmetadata
loadstart
loadeddata
loadedalldata
play
pause
timeupdate
ended
durationchange
progress
resize
volumechange
error
fullscreenchange

How do I observe <player> events?

You can observe a <player>'s events at any time (event before you create it) by using the <player>'s id and the CameraTag.observe method. Here is an example observing the 'MyPlayer1' play event:
CameraTag.observe('MyPlayer1', 'play', function(){
 alert('this player has started playing!')
});

loadstart

Fired when the user agent begins looking for media data.

loadedmetadata

Fired when the player has initial duration and dimension information.

loadstart

Fired when the user agent begins looking for media data.

loaderror

Fired when the player is unable to load info about the asset (often when a non-existant asset UUID is passed)

loadeddata

Fired when the player has downloaded data at the current playback position.

loadedalldata

Fired when the player has finished downloading the source data.

play

Fired whenever the media begins or resumes playback.

pause

Fired whenever the media has been paused.

timeupdate

Fired when the current playback position has changed. During playback this is fired every 15-250 milliseconds, depnding on the playback technology in use.

ended

Fired when the end of the media resource is reached. currentTime == duration

durationchange

Fired when the duration of the media resource is changed, or known for the first time.

progress

Fired while the user agent is downloading media data.

resize

Fired when the width and/or height of the player window changes.

volumechange

Fired when the volume changes.

error

Fired when there is an error in playback.

fullscreenchange

Fired when the player switches in or out of fullscreen mode.