Events

Player events and event handler interfaces

PlayerEvent

Enum

Events

AdBreakFinished

AdBreakFinished = "adbreakfinished"

Is fired when the playback of an ad break has ended and the main content has been restored. Is preceded by a AdBreakStarted event.
The passed event is of type AdBreakEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdBreakFinished constant.

Since: v7.5.4


AdBreakStarted

AdBreakStarted = "adbreakstarted"

Is fired when the playback of an ad break has started. Several AdStarted and
AdFinished events can follow before the ad break closes with an
AdBreakFinished event.
The passed event is of type AdBreakEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdBreakStarted constant.

Since: v7.5.4


AdClicked

AdClicked = "adclicked"

Is fired when the user clicks on the ad.
The passed event is of type AdClickedEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdClicked constant.

Since: v4.3


AdError

AdError = "aderror"

Is fired when ad playback fails.
The passed event is of type ErrorEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdError constant.

Since: v6.0


AdFinished

AdFinished = "adfinished"

Is fired when the playback of an ad has been finished.
The passed event is of type AdEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdFinished constant.

Since: v4.1


AdInteraction

AdInteraction = "adinteraction"

Is fired when the user interacts with an ad. For now this is only fired if a VPAID AdInteraction event occurs.
The passed event is of type AdInteractionEvent.

Since: v8.25.0


AdLinearityChanged

AdLinearityChanged = "adlinearitychanged"

Is fired when VPAID ad changes its linearity.
The passed event is of type AdLinearityChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdLinearityChanged constant.

Since: v6.0


AdManifestLoaded

AdManifestLoaded = "admanifestloaded"

Is fired when the ad manifest has been successfully loaded.
The passed event is of type AdManifestLoadedEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdManifestLoaded constant.

Since: v4.0


AdQuartile

AdQuartile = "adquartile"

Is fired when the playback of an ad has progressed over a quartile boundary.
The passed event is of type AdQuartileEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdQuartile constant.

Since: v7.4.6


AdSkipped

AdSkipped = "adskipped"

Is fired when an ad has been skipped.
The passed event is of type AdEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdSkipped constant.

Since: v4.1


AdStarted

AdStarted = "adstarted"

Is fired when the playback of an ad has been started.
The passed event is of type AdEvent.

Also accessible via the bitmovin.player.PlayerEvent.AdStarted constant.

Since: v4.1


AirplayAvailable

AirplayAvailable = "airplayavailable"

Is fired when the airplay playback target turned available.
The passed event is of type PlayerEventBase.

Since: v7.1


AirplayChanged

AirplayChanged = "airplaychanged"

Is fired when a media element starts or stops AirPlay playback.
The passed event is of type AirplayChangedEvent.

Since: v7.8.4


AspectRatioChanged

AspectRatioChanged = "aspectratiochanged"

Is fired when the player's aspect ratio is changed, e.g. with a call to setAspectRatio.
The passed event is of type AspectRatioChangedEvent.

Since: v8.74


AudioAdaptation

AudioAdaptation = "audioadaptation"

Is fired before a new audio segment is downloaded.
The passed event is of type AudioAdaptationEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioAdaptation constant.

Since: v4.0


AudioAdded

AudioAdded = "audioadded"

Is fired when a new audio track is added.
The passed event is of type AudioTrackEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioAdded constant.

Since: v7.1.4 / v7.2.0


AudioChanged

AudioChanged = "audiochanged"

Is fired when the audio track is changed. It is also fired when a newly added track becomes enabled after the
SourceLoaded event. In this case and if no other track was enabled before, the sourceAudio property
will be set to null.
The passed event is of type AudioChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioChanged constant.

Since: v7.0


AudioDownloadQualityChange

AudioDownloadQualityChange = "audiodownloadqualitychange"

Is fired when changing the downloaded audio quality is triggered, either by using setAudioQuality or due to
automatic dynamic adaptation.
The passed event is of type AudioDownloadQualityChangeEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioDownloadQualityChange constant.

Since: v4.0


AudioDownloadQualityChanged

AudioDownloadQualityChanged = "audiodownloadqualitychanged"

Is fired when the downloaded audio quality has been changed successfully. It is (not necessarily directly)
preceded by an AudioDownloadQualityChange event.
The passed event is of type AudioDownloadQualityChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioDownloadQualityChanged constant.

Since: v7.0


AudioPlaybackQualityChanged

AudioPlaybackQualityChanged = "audioplaybackqualitychanged"

Is fired when the played audio quality changed.
The passed event is of type AudioPlaybackQualityChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioPlaybackQualityChanged constant.

Since: v7.0


AudioQualityAdded

AudioQualityAdded = "audioqualityadded"

Is fired when one ore more audio representations have been added to the stream.
The passed event is of type AudioQualityEvent.

Since: v8.2


AudioQualityChanged

AudioQualityChanged = "audioqualitychanged"

Is fired when changing the audio quality is triggered by using setAudioQuality.
The passed event is of type AudioQualityChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioQualityChanged constant.

Since: v7.3.1


AudioQualityRemoved

AudioQualityRemoved = "audioqualityremoved"

Is fired when one ore more audio representations have been removed from the stream.
The passed event is of type AudioQualityEvent.

Since: v8.2


AudioRemoved

AudioRemoved = "audioremoved"

Is fired when an existing audio track is removed.
The passed event is of type AudioTrackEvent.

Also accessible via the bitmovin.player.PlayerEvent.AudioRemoved constant.

Since: v7.1.4 / v7.2.0


CastAvailable

CastAvailable = "castavailable"

Is fired when casting to another device, such as a ChromeCast, is available.
The passed event is of type CastAvailableEvent.

Also accessible via the bitmovin.player.PlayerEvent.CastAvailable constant.

Since: v4.0


CastStart

CastStart = "caststart"

Is fired when the casting has been initiated, but the user still needs to choose which device should be used.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.CastStart constant.

Since: v4.0


CastStarted

CastStarted = "caststarted"

Is fired when the Cast app is either launched successfully or an active Cast session is resumed successfully.
The passed event is of type CastStartedEvent.

Also accessible via the bitmovin.player.PlayerEvent.CastStarted constant.

Since: v7.0


CastStopped

CastStopped = "caststopped"

Is fired when the casting is stopped.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.CastStopped constant.

Since: v7.0


CastWaitingForDevice

CastWaitingForDevice = "castwaitingfordevice"

Is fired when the user has chosen a cast device and the player is waiting for the device to get ready for
playback.
The passed event is of type CastWaitingForDeviceEvent.

Also accessible via the bitmovin.player.PlayerEvent.CastWaitingForDevice constant.

Since: v4.0


ContentLocationChanged

ContentLocationChanged = "contentlocationchanged"

Is fired when the player has switched to a different content location (i.e. CDN) for one or all the media types.
This can happen as a result of a failover, or based on a content steering recommendation from the steering server.
For HLS streams, the failover of audio and video tracks is coordinated, so the event will only be fired once.
For DASH streams, the failover can run independently on audio and video tracks, so there may be separate events.

The passed event is of type ContentLocationChangedEvent

Since: v8.211.0


CueEnter

CueEnter = "cueenter"

Is fired when a subtitle entry transitions into the active status.
The passed event is of type SubtitleCueEvent.

Also accessible via the bitmovin.player.PlayerEvent.CueEnter constant.

Since: v4.0


CueExit

CueExit = "cueexit"

Is fired when an active subtitle entry transitions into the inactive status.
The passed event is of type SubtitleCueEvent.

Also accessible via the bitmovin.player.PlayerEvent.CueExit constant.

Since: v4.0


CueParsed

CueParsed = "cueparsed"

Is fired when a subtitle is parsed from a stream, manifest or subtitle file.
The passed event is of type SubtitleCueParsedEvent.

Also accessible via the bitmovin.player.PlayerEvent.CueParsed constant.

Since: v7.6


CueUpdate

CueUpdate = "cueupdate"

Is fired when either the start time, end time, or content of a cue changes.
The passed event is of type SubtitleCueEvent.

For example, it is fired when a WebVTT cue contains timestamp tags:

00:00:00.000 --> 00:00:05.000
Welcome to the<00:00:02.000> Bitmovin Player!

This would result in the following events:

{
  start: 0,
  end: 5,
  html: '<span>Welcome to the<span class="cue-future" style="visibility:hidden;"> Bitmovin Player!</span></span>',
  text: 'Welcome to the Bitmovin Player!',
  (...)
}
{
  start: 0,
  end: 5,
  html: '<span><span class="cue-past">Welcome to the</span> Bitmovin Player!</span>',
  text: 'Welcome to the Bitmovin Player!',
  (...)
}

Note that the text property does not change and always contains the full text content
of the cue.

Also accessible via the bitmovin.player.PlayerEvent.CueUpdate constant.

Since: v7.1


DVRWindowExceeded

DVRWindowExceeded = "dvrwindowexceeded"

Is fired if the player is paused or in buffering state and the timeShift offset has exceeded the available
timeShift window.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.DVRWindowExceeded constant.

Since: v4.0


Destroy

Destroy = "destroy"

Is fired when the player instance is destroyed.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.Destroy constant.

Since: v7.2


DownloadFinished

DownloadFinished = "downloadfinished"

Is fired immediately after a download finishes successfully, or if all retries of a download failed.
The passed event is of type DownloadFinishedEvent.

Also accessible via the bitmovin.player.PlayerEvent.DownloadFinished constant.

Since: v4.0


DrmLicenseAdded

DrmLicenseAdded = "drmlicenseadded"

Is fired after a DRM license request has finished and the returned license has been added to the key session.
This event is not dispatched for FairPlay DRM.

The passed event is of type DrmLicenseAddedEvent

Since: 8.51


DurationChanged

DurationChanged = "durationchanged"

Is fired when the duration of a source changes. Is not fired for the initial duration of a source.
The passed event is of type DurationChangedEvent.

Since: v8.19


Error

Error = "error"

Is fired when an error is encountered during setup (e.g. HTML5/JS cannot be used) or during playback.
The passed event is of type ErrorEvent.

Also accessible via the bitmovin.player.PlayerEvent.Error constant.

Since: v4.0


LatencyModeChanged

LatencyModeChanged = "latencymodechanged"

Is fired when the mode of the latency control mechanism changes.
The passed event is of type LatencyModeChangedEvent.

Since: v8.3


LicenseValidated

LicenseValidated = "licensevalidated"

Is fired after the licence call succeeded and the license is valid.
The passed event is of type LicenseValidatedEvent.

Since: v8.10


Metadata

Metadata = "metadata"

Is fired after metadata (i.e. ID3 tags in HLS and EMSG in DASH) is parsed and when currentTime
progresses to a point beyond the start of the metadata event.
The passed event is of type MetadataEvent.

Also accessible via the bitmovin.player.PlayerEvent.Metadata constant.

Since: v4.0


MetadataChanged

MetadataChanged = "metadatachanged"

Is fired when DateRange metadata content changes while the metadata is active.
The passed event is of type MetadataChangedEvent

Also accessible via the bitmovin.player.PlayerEvent.MetadataChanged constant.

Since: v8.5


MetadataParsed

MetadataParsed = "metadataparsed"

Is fired as soon as metadata (i.e. ID3 tags in HLS and EMSG in DASH) is parsed.
The passed event is of type MetadataParsedEvent.

Also accessible via the bitmovin.player.PlayerEvent.MetadataParsed constant.

Since: v7.6


ModuleReady

ModuleReady = "moduleready"

Is fired when a module exposes a public API and the API is ready to be used and available at
playerInstance.{namespace}, e.g. player.vr for the VR module.
The passed event is of type ModuleReadyEvent.

Since: v8.0


Muted

Muted = "muted"

Is fired when the player is muted.
The passed event is of type UserInteractionEvent.

Also accessible via the bitmovin.player.PlayerEvent.Muted constant.

Since: v7.0


OverlayAdStarted

OverlayAdStarted = "overlayadstarted"

Is fired when an overlay ad has been started.
The passed event is of type AdEvent.

Also accessible via the bitmovin.player.PlayerEvent.OverlayAdStarted constant.

Since: v8.0


Paused

Paused = "paused"

Is fired when the player enters the pause state.
The passed event is of type PlaybackEvent.

Also accessible via the bitmovin.player.PlayerEvent.Paused constant.

Since: v7.0


PeriodSwitch

PeriodSwitch = "periodswitch"

Is fired when a period switch starts.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.PeriodSwitch constant.

Since: v6.2


PeriodSwitched

PeriodSwitched = "periodswitched"

Is fired when a period switch was performed.
The passed event is of type PeriodSwitchedEvent.

Also accessible via the bitmovin.player.PlayerEvent.PeriodSwitched constant.

Since: v4.0


Play

Play = "play"

Is fired when the player enters the play state.

The passed event is of type PlaybackEvent.

Also accessible via the bitmovin.player.PlayerEvent.Play constant.

Since: v4.0


PlaybackFinished

PlaybackFinished = "playbackfinished"

Is fired when the playback of the current video has finished.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.PlaybackFinished constant.

Since: v4.0


PlaybackSpeedChanged

PlaybackSpeedChanged = "playbackspeedchanged"

Is fired when the playback speed is changed.
The passed event is of type PlaybackSpeedChangedEvent.

Since: v7.8


PlayerResized

PlayerResized = "playerresized"

Is fired when the player size is updated.
The passed event is of type PlayerResizedEvent.

Also accessible via the bitmovin.player.PlayerEvent.PlayerResized constant.

Since: v8.0


Playing

Playing = "playing"

Is fired when the player actually has started playback.
The passed event is of type PlaybackEvent.

Also accessible via the bitmovin.player.PlayerEvent.Playing constant.

Instance

Since: v7.3


Ready

Ready = "ready"

Is fired when the player has enough data to start playback

The semantic of the Event changed in player version 8. Before v8 it was used to signal the end of the setup

Also accessible via the bitmovin.player.PlayerEvent.Ready constant.

Since: v8.0


RestoringContent

RestoringContent = "restoringcontent"

Is fired when the playback of an break has finished and the player is about to start restoring the main content.
Is succeeded by a AdBreakFinished event once the main content has been restored.

Since: v8.193.0


Seek

Seek = "seek"

Is fired periodically during seeking. Only applies to VoD streams, please refer to TimeShift for live.
The passed event is of type SeekEvent.

It is only triggered through a public API call.

Using the startOffset does not trigger this event.

Also accessible via the bitmovin.player.PlayerEvent.Seek constant.

Since: v4.0


Seeked

Seeked = "seeked"

Is fired when seeking has been finished and data is available to continue playback. Only applies to VoD streams,
please refer to TimeShifted for live.
The passed event is of type PlayerEventBase.

It is only triggered through a public API call.

Using the startOffset does not trigger this event.

Also accessible via the bitmovin.player.PlayerEvent.Seeked constant.

Since: v4.0


SegmentPlayback

SegmentPlayback = "segmentplayback"

Is fired when a segment is played back.
The passed event is of type SegmentPlaybackEvent.

For HLS streams being played in the native player technology, the native_hls_parsing
option needs to be enabled to receive this event.

Also accessible via the bitmovin.player.PlayerEvent.SegmentPlayback constant.

Since: v6.1


SegmentRequestFinished

SegmentRequestFinished = "segmentrequestfinished"

Is fired when a segment download has been finished, whether successful or not.
The passed event is of type SegmentRequestFinishedEvent.

Also accessible via the bitmovin.player.PlayerEvent.SegmentRequestFinished constant.

Since: v6.0


ShowAirplayTargetPicker

ShowAirplayTargetPicker = "showairplaytargetpicker"

Is fired when the airplay playback target picker is shown.
The passed event is of type PlayerEventBase.

Since: v7.1


SourceLoaded

SourceLoaded = "sourceloaded"

Is fired when a new source has finished loading.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.SourceLoaded constant.

Since: v4.2


SourceUnloaded

SourceUnloaded = "sourceunloaded"

Is fired when the current source has been unloaded.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.SourceUnloaded constant.

Since: v4.2


StallEnded

StallEnded = "stallended"

Is fired when the player ends stalling due to enough data in the buffer.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.StallEnded constant.

Since: v7.0


StallStarted

StallStarted = "stallstarted"

Is fired when the player begins to stall and to buffer due to an empty buffer.
The passed event is of type PlayerEventBase.

Also accessible via the bitmovin.player.PlayerEvent.StallStarted constant.

Since: v7.0


SubtitleAdded

SubtitleAdded = "subtitleadded"

Is fired when a new subtitles/captions track is added, for example using the addSubtitle API call or when
in-stream closed captions are encountered.
The passed event is of type SubtitleEvent.

Also accessible via the bitmovin.player.PlayerEvent.SubtitleAdded constant.

Since: v4.0


SubtitleDisable

SubtitleDisable = "subtitledisable"

Is fired when a subtitle is being disabled.
The passed event is of type SubtitleEvent.

Since: v8.0


SubtitleDisabled

SubtitleDisabled = "subtitledisabled"

Is fired when a subtitle got disabled.
The passed event is of type SubtitleEvent.

Since: v8.0


SubtitleEnable

SubtitleEnable = "subtitleenable"

Is fired when a subtitle is being enabled.
The passed event is of type SubtitleEvent.

Since: v8.0


SubtitleEnabled

SubtitleEnabled = "subtitleenabled"

Is fired when a subtitle got enabled.
The passed event is of type SubtitleEvent.

Since: v8.0


SubtitleRemoved

SubtitleRemoved = "subtitleremoved"

Is fired when an external subtitle file has been removed so it is possible to update the controls accordingly.
The passed event is of type SubtitleEvent.

Also accessible via the bitmovin.player.PlayerEvent.SubtitleRemoved constant.

Since: v4.0


TargetLatencyChanged

TargetLatencyChanged = "targetlatencychanged"

Is fired when the target latency for playback of a live stream changes.
The passed event is of type TargetLatencyChangedEvent.

Since: v8.3


TimeChanged

TimeChanged = "timechanged"

Is fired when the current playback time has changed.
The passed event is of type PlaybackEvent.

Also accessible via the bitmovin.player.PlayerEvent.TimeChanged constant.

Since: v4.0


TimeShift

TimeShift = "timeshift"

Is fired periodically during time shifting. Only applies to live streams, please refer to Seek for VoD.
The passed event is of type TimeShiftEvent.

It is only triggered through a public API call.

Using the startOffset does not trigger this event.

Also accessible via the bitmovin.player.PlayerEvent.TimeShift constant.

Since: v5.0


TimeShifted

TimeShifted = "timeshifted"

Is fired when time shifting has been finished and data is available to continue playback. Only applies to live
streams, please refer to Seeked for VoD.
The passed event is of type PlayerEventBase.

It is only triggered through a public API call.

Using the startOffset does not trigger this event.

Also accessible via the bitmovin.player.PlayerEvent.TimeShifted constant.

Since: v5.0


Unmuted

Unmuted = "unmuted"

Is fired when the player is unmuted.
The passed event is of type UserInteractionEvent.

Also accessible via the bitmovin.player.PlayerEvent.Unmuted constant.

Since: v7.0


VRStereoChanged

VRStereoChanged = "vrstereochanged"

Is fired when the stereo mode during playback of VR content changes.
The passed event is of type VRStereoChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.VRStereoChanged constant.

Since: v6.0


VRViewingDirectionChange

VRViewingDirectionChange = "vrviewingdirectionchange"

This event is fired when the VR viewing direction changes. The minimal interval between two consecutive event
callbacks is specified through setViewingDirectionChangeEventInterval.
The passed event is of type VRViewingDirectionChangeEvent.

Also accessible via the bitmovin.player.PlayerEvent.VRViewingDirectionChange constant.

Since: v7.2


VRViewingDirectionChanged

VRViewingDirectionChanged = "vrviewingdirectionchanged"

This event is fired when the VR viewing direction did not change more than the specified threshold in the last
interval, after the VRViewingDirectionChange event was triggered. The threshold can be set through
setViewingDirectionChangeThreshold.
The passed event is of type VRViewingDirectionChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.VRViewingDirectionChanged constant.

Since: v7.2


VideoAdaptation

VideoAdaptation = "videoadaptation"

Is fired before a new video segment is downloaded.
The passed event is of type VideoAdaptationEvent.

Also accessible via the bitmovin.player.PlayerEvent.VideoAdaptation constant.

Since: v4.0


VideoDownloadQualityChange

VideoDownloadQualityChange = "videodownloadqualitychange"

Is fired when changing the downloaded video quality is triggered, either by using setVideoQuality or due to
automatic dynamic adaptation.
The passed event is of type VideoDownloadQualityChangeEvent.

Also accessible via the bitmovin.player.PlayerEvent.VideoDownloadQualityChange constant.

Since: v4.0


VideoDownloadQualityChanged

VideoDownloadQualityChanged = "videodownloadqualitychanged"

Is fired when the downloaded video quality has been changed successfully. It is (not necessarily directly)
preceded by an VideoDownloadQualityChange event.
The passed event is of type VideoDownloadQualityChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.VideoDownloadQualityChanged constant.

Since: v7.0


VideoPlaybackQualityChanged

VideoPlaybackQualityChanged = "videoplaybackqualitychanged"

Is fired when the displayed video quality changed.
The passed event is of type VideoPlaybackQualityChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.VideoPlaybackQualityChanged constant.

Since: v7.0


VideoQualityAdded

VideoQualityAdded = "videoqualityadded"

Is fired when one ore more video representations have been added to the stream.
The passed event is of type VideoQualityEvent.

Since: v8.2


VideoQualityChanged

VideoQualityChanged = "videoqualitychanged"

Is fired when changing the video quality is triggered by using setVideoQuality.
The passed event is of type VideoQualityChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.VideoQualityChanged constant.

Since: v7.3.1


VideoQualityRemoved

VideoQualityRemoved = "videoqualityremoved"

Is fired when one ore more video representations have been removed from the stream.
The passed event is of type VideoQualityEvent.

Since: v8.2


ViewModeChanged

ViewModeChanged = "viewmodechanged"

Is fired when the player's ViewMode is changed, e.g. with a call to setViewMode.
The passed event is of type ViewModeChangedEvent.

Since: v8.0


VolumeChanged

VolumeChanged = "volumechanged"

Is fired when the volume is changed.
The passed event is of type VolumeChangedEvent.

Also accessible via the bitmovin.player.PlayerEvent.VolumeChanged constant.

Since: v7.0


Warning

Warning = "warning"

Is fired when something happens which is not as serious as an error but could potentially affect playback or other
functionalities.
The passed event is of type WarningEvent.

Also accessible via the bitmovin.player.PlayerEvent.Warning constant.

Since: v5.1