Show Menu
TOPICS×

Playback events

Your application can monitor the activity in your player and the changing state of the player by listening for events dispatched by TVSDK.
TVSDK dispatches playback events when media playback operations occur, such as a video starting to play. To be notified about all playback-related events, register listeners with the MediaPlayer object for the following events.
Event Meaning
Playback
PlaybackRateEvent. RATE_SELECTED The user or TVSDK has selected a new playback rate, such as fast forward, rewind, or resume playing at a normal speed.
PlaybackRateEvent. RATE_PLAYING A new playback rate is visible on the screen.
TimeChangeEvent. TIME_CHANGED The current playhead position of the media has changed. Dispatched periodically when the current time has changed, every 250 ms or more.
Media Player
MediaPlayerStatus ChangeEvent. STATUS_CHANGED The status of the media player has changed. Your application should handle errors in this event's callback.
ProfileEvent. PROFILE_CHANGED The media player's current profile has changed. Use the ProfileEvent.profile property to get the new profile that is being played. Use the time property to get the time when this event occurred.
MediaplayerItem
MediaPlayerItem Event. ITEM_CREATED A MediaPlayerItem has been created.
MediaPlayerItem Event. ITEM_UPDATED The media player has successfully updated the media in either of these cases:
  • When a manifest refresh occurs for a live asset.
  • When a VOD or live asset has closed captioning and activity is first discovered for a closed captioning track.
Captions and Audio
MediaPlayerItem Event. CAPTION_UPDATED A new closed captioning track has been detected in the media stream and the closedCaptionsTracks collection has been updated.
Manifest and Timeline
TimelineEvent. TIMELINE_UPDATED The media player has added or removed ads, so it has an updated timeline.
The manifest refreshed for a live asset and old ad breaks were removed from the timeline or new ad opportunities (cue points) were discovered. The media player tries to resolve and place any new ads on the timeline.
Use this event to check whether the timeline has any updates (VOD does not change during playback). You can then retrieve the timeline using MediaPlayer.timeline .