Player Events / Video Tracking Event Handlers

The video tracking events triggered by a standard video player correspond to the methods exposed by the video heartbeat API to handle those events.

The video heartbeat interface consistently defines complex video tracking operations, organized into the following four event groups:
  • Track regular playback events - This includes load, play, stop/pause, playback completion, seek operations, and buffer operations.
  • Track ad-related player activity - This includes information about user clicks, ads and ad-breaks, and their corresponding progress.
  • Track QoS-related information - This includes bitrate changes, frame rates, and frame-loss rates.
  • Track error information - This includes error events triggered by the video player, as well as by the container application level.

The table below lists the events associated with the standard operations found in most video players, and the corresponding video heartbeat API methods that correspond to each player event:

Player Event video heartbeat API Parameter List
     
Playback Tracking  
MEDIA_LOADED trackMainVideoLoad()
  • videoId:String - The ID of the main video content
  • length:Number - The duration (in seconds) of the main video content, excluding the ad content.
  • type:String - The type of the underlying stream (live, VOD or linear)
PLAY trackPlay() None
STOP (PAUSE) trackStop() None
COMPLETE trackMainVideoClose() None
SEEK_START trackSeekStart() None
SEEK_END trackSeekComplete() None
BUFFER_START trackBufferStart() None
BUFFER_END trackBufferComplete() None
     
Ad Tracking  
AD_BREAK_START trackAdBreakStart() podId:String - The ID of the new "pod" that is starting.
AD_BREAK_COMPLETE trackAdBreakComplete() None
AD_START trackAdStart()
  • adId:String - The id of the new ad that is starting.
  • length:Number - The length of the ad (in seconds)
  • parentPodPosition:Number - The index of the ad inside the parent ad-break
  • cpm:String - The associated CPM value.
AD_COMPLETE trackAdComplete() None
CLICK trackClick() None
     
QoS Information Tracking  
BITRATE_CHANGE trackBitrateChange() bitrate:Number - The new bitrate value (in bps)
QOS_UPDATE trackQoSUpdate() qosData: VideoTrackerQoSData - A collection of QoS information.
     
Error Tracking  
ERROR trackVideoPlayerError() errorId:String - Unique error identifier
ERROR trackApplicationError() errorId:String - Unique error identifier