PlayerEvent

PlayerEvent

sealed class PlayerEvent : Event

Includes all possible events that only the Player can emit.

Inheritors

AdBreakStarted
AdBreakFinished
AdError
AdStarted
AdClicked
AdFinished
AdLinearityChanged
AdManifestLoad
AdManifestLoaded
AdQuartile
AdScheduled
AdScheduleChanged
AdSkipped
AudioPlaybackQualityChanged
CastAvailable
CastPaused
CastPlaybackFinished
CastPlaying
CastStarted
CastStart
CastStopped
CastTimeUpdated
CastWaitingForDevice
CueEnter
CueExit
DownloadFinished
Destroy
DroppedVideoFrames
DvrWindowExceeded
Error
Warning
Info
FullscreenEnabled
FullscreenDisabled
FullscreenEnter
FullscreenExit
Impression
LicenseValidated
Metadata
Muted
PictureInPictureAvailabilityChanged
PictureInPictureEnter
PictureInPictureEntered
PictureInPictureExit
PictureInPictureExited
PlaybackFinished
Active
Inactive
SourceAdded
SourceRemoved
Play
Playing
Paused
PlaylistTransition
Ready
RenderFirstFrame
FrameAboutToBeRendered
Seek
Seeked
StallEnded
StallStarted
TimeChanged
TimeShift
TimeShifted
Unmuted
VideoPlaybackQualityChanged
VideoSizeChanged
VrStereoChanged
VrViewingDirectionChanged
VrViewingDirectionChange
ScalingModeChanged

Types

NameSummary
Activeclass Active : PlayerEvent
Emitted when a playback session was started. This event is emitted immediately after the load call und does not wait for actual data to be loaded.
AdBreakFinisheddata class AdBreakFinished(val adBreak: AdBreak? = null) : PlayerEvent
Emitted when an ad break has finished.
AdBreakStarteddata class AdBreakStarted(val adBreak: AdBreak? = null) : PlayerEvent
Emitted when an ad break has started.
AdClickeddata class AdClicked(val clickThroughUrl: String?) : PlayerEvent
Emitted when an ad was clicked.
AdErrordata class AdError(val adItem: AdItem?, val code: Int, val message: String?, val adConfig: AdConfig? = null) : PlayerEvent
Emitted when an error with the ad playback occurs.
AdFinisheddata class AdFinished(val ad: Ad? = null) : PlayerEvent
Emitted when an ad has finished playback.
AdLinearityChangeddata class AdLinearityChanged(val isLinear: Boolean) : PlayerEvent
Emitted when the linearity of a VPAID ad changes.
AdManifestLoaddata class AdManifestLoad(val adConfig: AdConfig, val adBreak: AdBreak? = null) : PlayerEvent
Emitted when the download of an ad manifest is started.
AdManifestLoadeddata class AdManifestLoaded(val adConfig: AdConfig, val adBreak: AdBreak? = null, val downloadTime: Long) : PlayerEvent
Emitted when an ad manifest was successfully loaded.
AdQuartiledata class AdQuartile(val quartile: AdQuartile) : PlayerEvent
Emitted when the playback of an ad has progressed over a quartile boundary.
AdScheduleChangeddata class AdScheduleChanged(val oldSchedule: List<AdBreak>, val newSchedule: List<AdBreak>) : PlayerEvent
Emitted when the AdvertisingApi.schedule changes.
AdScheduleddata class AdScheduled(val numberOfAds: Int) : PlayerEvent
Emitted when an ad was successfully scheduled into the player.
AdSkippeddata class AdSkipped(val ad: Ad? = null) : PlayerEvent
Emitted when an ad was skipped.
AdStarteddata class AdStarted(val clientType: AdSourceType?, val clickThroughUrl: String?, val indexInQueue: Int, val duration: Double, val timeOffset: Double, val position: String?, val skipOffset: Double, val ad: Ad? = null) : PlayerEvent
Emitted when the playback of an ad has started.
AudioPlaybackQualityChangeddata class AudioPlaybackQualityChanged(val oldAudioQuality: AudioQuality?, val newAudioQuality: AudioQuality?) : PlayerEvent
Emitted when the current audio playback quality has changed.
CastAvailableclass CastAvailable : PlayerEvent
Emitted when casting to a cast-compatible device is available.
CastPausedclass CastPaused : PlayerEvent
Emitted when the playback on a cast-compatible device was paused.
CastPlaybackFinishedclass CastPlaybackFinished : PlayerEvent
Emitted when the playback on a cast-compatible device has finished.
CastPlayingclass CastPlaying : PlayerEvent
Emitted when playback on a cast-compatible device has started.
CastStartclass CastStart : PlayerEvent
Emitted when casting is initiated, but the user still needs to choose which device should be used.
CastStarteddata class CastStarted(val deviceName: String?) : PlayerEvent
Emitted when the cast app is launched successfully.
CastStoppedclass CastStopped : PlayerEvent
Emitted when casting to a cast-compatible device is stopped.
CastTimeUpdatedclass CastTimeUpdated : PlayerEvent
Emitted when the time update from the currently used cast-compatible device is received.
CastWaitingForDevicedata class CastWaitingForDevice(val castPayload: CastPayload) : PlayerEvent
Emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for playback.
CueEnterdata class CueEnter(val cue: Cue) : PlayerEvent
Emitted when a subtitle cue transitions into the active status.
CueExitdata class CueExit(var cue: Cue) : PlayerEvent
Emitted when an active subtitle cue transitions into the inactive status.
Destroyclass Destroy : PlayerEvent
Emitted when the player was destroyed.
DownloadFinisheddata class DownloadFinished(val downloadType: HttpRequestType, val url: String, val lastRedirectLocation: String?, val downloadTime: Double, val httpStatus: Int, val size: Long, val isSuccess: Boolean) : PlayerEvent
Emitted when a download was finished that is not directly related to a specific source.
DroppedVideoFramesdata class DroppedVideoFrames(val droppedFrames: Int, val elapsedTime: Double) : PlayerEvent
Emitted when video frames have been dropped.
DvrWindowExceededclass DvrWindowExceeded : PlayerEvent
Emitted when the player is paused or in buffering state and the timeShift offset has exceeded the available timeShift window.
Errordata class Error(val code: PlayerErrorCode, val message: String, val data: Any? = null, val deficiencyData: DeficiencyData? = null) : ErrorEvent, PlayerEvent
Emitted when a player error occurred.
FrameAboutToBeRendereddata class FrameAboutToBeRendered(val presentationTimeUs: Long, val releaseTimeNs: Long) : PlayerEvent
Emitted for every frame that will be rendered onto the video surface. This event needs to be enabled by setting Player.isFrameAboutToBeRenderedEventEnabled to true. The event will be emitted on the playback thread. It is very important that handling this event must be done very efficient to not block the playback thread.
FullscreenDisabledclass FullscreenDisabled : PlayerEvent
Emitted when the fullscreen functionality has been disabled.
FullscreenEnabledclass FullscreenEnabled : PlayerEvent
Emitted when the fullscreen functionality has been enabled.
FullscreenEnterclass FullscreenEnter : PlayerEvent
Emitted when the player enters fullscreen mode.
FullscreenExitclass FullscreenExit : PlayerEvent
Emitted when the player exits fullscreen mode.
Impressiondata class Impression(val data: ImpressionData) : PlayerEvent
Emitted when an impression call succeeded.
Inactiveclass Inactive : PlayerEvent
Emitted when the active playback session was stopped.
Infodata class Info(val message: String) : InfoEvent, PlayerEvent
Emitted for neutral information provided by the player. The information provided with this event is only for analytical purposes and are subject to change. Thus, neither the timing nor the content should be used to trigger workflows, but may be used for logging.
LicenseValidateddata class LicenseValidated(val data: LicenseData) : PlayerEvent
Emitted when a licensing call succeeded.
Metadatadata class Metadata(val metadata: Metadata, val type: String) : PlayerEvent
Emitted when metadata (e.g. Id3Frame in HLS and EventMessage in DASH) is encountered.
Mutedclass Muted : PlayerEvent
Emitted when the player is muted on either the local device or on a cast-compatible device.
Pauseddata class Paused(val time: Double) : PlayerEvent
Emitted when the player is paused.
PictureInPictureAvailabilityChangeddata class PictureInPictureAvailabilityChanged(val isPictureInPictureAvailable: Boolean) : PlayerEvent
Emitted when the availability of the Picture-in-Picture mode changed.
PictureInPictureEnterclass PictureInPictureEnter : PlayerEvent
Emitted when the player enters Picture-In-Picture mode.
PictureInPictureEnteredclass PictureInPictureEntered : PlayerEvent
Emitted when the enter transition of the player to Picture-In-Picture mode is completed.
PictureInPictureExitclass PictureInPictureExit : PlayerEvent
Emitted when the player exits Picture-In-Picture mode.
PictureInPictureExitedclass PictureInPictureExited : PlayerEvent
Emitted when the exit transition of the player from Picture-In-Picture mode is completed.
Playdata class Play(val time: Double) : PlayerEvent
Emitted when the player receives an intention to play (i.e Player.play).
PlaybackFinishedclass PlaybackFinished : PlayerEvent
Emitted when playback of the Source has finished. If multiple sources are loaded into the player via a PlaylistConfig, the event is emitted when playback of the last Source in the playlist finished.
Playingdata class Playing(val time: Double) : PlayerEvent
Emitted when the player enters the playing state after calling Player.play.
PlaylistTransitiondata class PlaylistTransition(val from: Source, val to: Source) : PlayerEvent
Emitted when the player transitions between two sources in a playlist.
Readyclass Ready : PlayerEvent
Emitted when the player is ready to play and to handle API calls.
RenderFirstFrameclass RenderFirstFrame : PlayerEvent
Emitted when the first frame of the current video is rendered onto the video surface.
ScalingModeChangeddata class ScalingModeChanged(val from: ScalingMode, val to: ScalingMode) : PlayerEvent
Emitted when the PlayerView.getScalingMode is changed.
Seekdata class Seek(val from: SeekPosition, val to: SeekPosition) : PlayerEvent
Emitted when the player starts seeking. Only applies to VoD streams. Refer to TimeShift for live streams.
Seekedclass Seeked : PlayerEvent
Emitted when seeking has finished and data is available to continue playback. Only applies to VoD streams. Refer to TimeShifted for live streams.
SourceAddeddata class SourceAdded(val source: Source, val index: Int) : PlayerEvent
Emitted when a Source was added to an active playback session.
SourceRemoveddata class SourceRemoved(val source: Source, val index: Int) : PlayerEvent
Emitted when a Source was removed from an active playback session.
StallEndedclass StallEnded : PlayerEvent
Emitted when the player ends stalling due to enough data being buffered.
StallStartedclass StallStarted : PlayerEvent
Emitted when the player begins to stall and to buffer due to an empty buffer.
TimeChangeddata class TimeChanged(val time: Double) : PlayerEvent
Emitted when the current playback time has changed.
TimeShiftdata class TimeShift(val position: Double, val target: Double) : PlayerEvent
Emitted when the player starts time shifting. Only applies to live streams. Refer to Seek for VoD streams.
TimeShiftedclass TimeShifted : PlayerEvent
Emitted when time shifting has finished and data is available to continue playback. Only applies to live streams. Refer to Seeked for VoD streams.
Unmutedclass Unmuted : PlayerEvent
Emitted when the player is unmuted on either the local device or on a cast-compatible device.
VideoPlaybackQualityChangeddata class VideoPlaybackQualityChanged(val oldVideoQuality: VideoQuality?, val newVideoQuality: VideoQuality?) : PlayerEvent
Emitted when the current video playback quality has changed.
VideoSizeChangeddata class VideoSizeChanged(val width: Int, val height: Int, val aspectRatio: Float) : PlayerEvent
Emitted when the current size of the video content has changed.
VrStereoChangeddata class VrStereoChanged(val isStereo: Boolean) : PlayerEvent
Emitted when the VR stereo mode during playback of VR content changes.
VrViewingDirectionChangeclass VrViewingDirectionChange : PlayerEvent
Emitted when the VR viewing direction changes. The minimal interval between two consecutive event callbacks is specified through VrConfig.viewingDirectionChangeEventInterval.
VrViewingDirectionChangedclass VrViewingDirectionChanged : PlayerEvent
Emitted 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 setVRViewingDirectionChangeThreshold.
Warningdata class Warning(val code: PlayerWarningCode, val message: String, val deficiencyData: DeficiencyData? = null) : WarningEvent, PlayerEvent
Emitted when a player warning occurred.