Player Event

Player Event

This event type is raised by the player as a notification when the player state changes and when users interact with the player. For example, when the video starts playing, is paused, etc. You can register for the various state changed events:

player.on(event, function(response) {
  // do something
});

Example:

player.on('durationchange', function(response) {
  window.console.log('duration change: ', response);
});

Event list

Event Description
levelchange Fired when the video quality change manualy
durationchange Fired when the duration of the media resource is first known or changed
ended Fired when the end of the media resource is reached (currentTime == duration)
error Fired when an error occurs
firstplay Fired when the first loadstart for a video.
fullscreenchange Fired when the player switches in or out of fullscreen mode
click Fired when the user clicks on an element
contextmenu Fired when the user right-clicks on an element to open a context menu
dblclick Fired when the user double-clicks on an element
keydown Fired when the user is pressing a key (on the keyboard)
keypress Fired when the user presses a key (on the keyboard).
Note: The keypress event is not fired for all keys (e.g. ALT, CTRL, SHIFT, ESC) in all browsers. To detect only whether the user has pressed a key, use the keydown event instead, because it works for all keys.
keyup Fired when the user releases a key (on the keyboard)
mousedown Fired when the user presses a mouse button over an element
mouseenter Fired when the pointer is moved onto an element
mouseleave Fired when the pointer is moved out of an element
mousemove Fired when the pointer is moving while it is over an element
mouseout Fired when a user moves the mouse pointer out of an element, or out of one of its children
mouseover Fired when the pointer is moved onto an element, or onto one of its children
mouseup Fired when a user releases a mouse button over an element
pause Fired whenever the media has been paused
play Fired whenever the media begins or resumes playback
playing Fired when the video is playing
progress Fired when the buffer is progressing
qualitieschange Fired when the list qualities of video change
ratechange Fired when the rate changed
ready Fired when the player is ready
resize Fired when the size changed
texttrackchange Fired when the text track changed
timeupdate Fired when the current playback position has changed
During playback this is fired every 15-250 milliseconds, depending on the playback technology in use
volumechange Fired when the volume or/and muted changed