Interface AnalyticsListener
-
- All Known Implementing Classes:
EventLogger
,ExoHostedTest
,MediaMetricsListener
,PlaybackStatsListener
@Deprecated public interface AnalyticsListener
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.A listener for analytics events.All events are recorded with an
AnalyticsListener.EventTime
specifying the elapsed real time and media time at the time of the event.All methods have no-op default implementations to allow selective overrides.
Listeners can choose to implement individual events (e.g.
onIsPlayingChanged(EventTime, boolean)
) oronEvents(Player, Events)
, which is called after one or more events occurred together.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AnalyticsListener.EventFlags
Deprecated.Events that can be reported viaonEvents(Player, Events)
.static class
AnalyticsListener.Events
Deprecated.A set ofAnalyticsListener.EventFlags
.static class
AnalyticsListener.EventTime
Deprecated.Time information of an event.
-
Field Summary
Fields Modifier and Type Field Description static int
EVENT_AUDIO_ATTRIBUTES_CHANGED
Deprecated.Audio attributes changed.static int
EVENT_AUDIO_CODEC_ERROR
Deprecated.The audio codec encountered an error.static int
EVENT_AUDIO_DECODER_INITIALIZED
Deprecated.An audio renderer created a decoder.static int
EVENT_AUDIO_DECODER_RELEASED
Deprecated.An audio renderer released a decoder.static int
EVENT_AUDIO_DISABLED
Deprecated.An audio renderer was disabled.static int
EVENT_AUDIO_ENABLED
Deprecated.An audio renderer was enabled.static int
EVENT_AUDIO_INPUT_FORMAT_CHANGED
Deprecated.The format consumed by an audio renderer changed.static int
EVENT_AUDIO_POSITION_ADVANCING
Deprecated.The audio position has increased for the first time since the last pause or position reset.static int
EVENT_AUDIO_SESSION_ID
Deprecated.An audio session id was set.static int
EVENT_AUDIO_SINK_ERROR
Deprecated.The audio sink encountered a non-fatal error.static int
EVENT_AUDIO_UNDERRUN
Deprecated.An audio underrun occurred.static int
EVENT_AVAILABLE_COMMANDS_CHANGED
Deprecated.Player.getAvailableCommands()
changed.static int
EVENT_BANDWIDTH_ESTIMATE
Deprecated.The bandwidth estimate has been updated.static int
EVENT_CUES
Deprecated.Player.getCurrentCues()
changed.static int
EVENT_DEVICE_INFO_CHANGED
Deprecated.Player.getDeviceInfo()
changed.static int
EVENT_DEVICE_VOLUME_CHANGED
Deprecated.Player.getDeviceVolume()
changed.static int
EVENT_DOWNSTREAM_FORMAT_CHANGED
Deprecated.The downstream format sent to renderers changed.static int
EVENT_DRM_KEYS_LOADED
Deprecated.DRM keys were loaded.static int
EVENT_DRM_KEYS_REMOVED
Deprecated.DRM keys were removed.static int
EVENT_DRM_KEYS_RESTORED
Deprecated.DRM keys were restored.static int
EVENT_DRM_SESSION_ACQUIRED
Deprecated.A DRM session has been acquired.static int
EVENT_DRM_SESSION_MANAGER_ERROR
Deprecated.A non-fatal DRM session manager error occurred.static int
EVENT_DRM_SESSION_RELEASED
Deprecated.A DRM session has been released.static int
EVENT_DROPPED_VIDEO_FRAMES
Deprecated.Video frames have been dropped.static int
EVENT_IS_LOADING_CHANGED
Deprecated.Player.isLoading()
()} changed.static int
EVENT_IS_PLAYING_CHANGED
Deprecated.Player.isPlaying()
changed.static int
EVENT_LOAD_CANCELED
Deprecated.A source canceled loading data.static int
EVENT_LOAD_COMPLETED
Deprecated.A source started completed loading data.static int
EVENT_LOAD_ERROR
Deprecated.A source had a non-fatal error loading data.static int
EVENT_LOAD_STARTED
Deprecated.A source started loading data.static int
EVENT_MAX_SEEK_TO_PREVIOUS_POSITION_CHANGED
Deprecated.static int
EVENT_MEDIA_ITEM_TRANSITION
Deprecated.Player.getCurrentMediaItem()
changed or the player started repeating the current item.static int
EVENT_MEDIA_METADATA_CHANGED
Deprecated.Player.getMediaMetadata()
changed.static int
EVENT_METADATA
Deprecated.Metadata associated with the current playback time was reported.static int
EVENT_PLAY_WHEN_READY_CHANGED
Deprecated.Player.getPlayWhenReady()
changed.static int
EVENT_PLAYBACK_PARAMETERS_CHANGED
Deprecated.Player.getPlaybackParameters()
changed.static int
EVENT_PLAYBACK_STATE_CHANGED
Deprecated.Player.getPlaybackState()
changed.static int
EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED
Deprecated.static int
EVENT_PLAYER_ERROR
Deprecated.Player.getPlayerError()
changed.static int
EVENT_PLAYER_RELEASED
Deprecated.The player was released.static int
EVENT_PLAYLIST_METADATA_CHANGED
Deprecated.Player.getPlaylistMetadata()
changed.static int
EVENT_POSITION_DISCONTINUITY
Deprecated.A position discontinuity occurred.static int
EVENT_RENDERED_FIRST_FRAME
Deprecated.The first frame has been rendered since setting the surface, since the renderer was reset or since the stream changed.static int
EVENT_REPEAT_MODE_CHANGED
Deprecated.Player.getRepeatMode()
changed.static int
EVENT_SEEK_BACK_INCREMENT_CHANGED
Deprecated.Player.getSeekBackIncrement()
changed.static int
EVENT_SEEK_FORWARD_INCREMENT_CHANGED
Deprecated.Player.getSeekForwardIncrement()
changed.static int
EVENT_SHUFFLE_MODE_ENABLED_CHANGED
Deprecated.Player.getShuffleModeEnabled()
changed.static int
EVENT_SKIP_SILENCE_ENABLED_CHANGED
Deprecated.Skipping silences was enabled or disabled in the audio stream.static int
EVENT_SURFACE_SIZE_CHANGED
Deprecated.The surface size changed.static int
EVENT_TIMELINE_CHANGED
Deprecated.Player.getCurrentTimeline()
changed.static int
EVENT_TRACK_SELECTION_PARAMETERS_CHANGED
Deprecated.Player.getTrackSelectionParameters()
changed.static int
EVENT_TRACKS_CHANGED
Deprecated.Player.getCurrentTracks()
changed.static int
EVENT_UPSTREAM_DISCARDED
Deprecated.Data was removed from the end of the media buffer.static int
EVENT_VIDEO_CODEC_ERROR
Deprecated.The video codec encountered an error.static int
EVENT_VIDEO_DECODER_INITIALIZED
Deprecated.A video renderer created a decoder.static int
EVENT_VIDEO_DECODER_RELEASED
Deprecated.A video renderer released a decoder.static int
EVENT_VIDEO_DISABLED
Deprecated.A video renderer was disabled.static int
EVENT_VIDEO_ENABLED
Deprecated.A video renderer was enabled.static int
EVENT_VIDEO_FRAME_PROCESSING_OFFSET
Deprecated.Video frame processing offset data has been reported.static int
EVENT_VIDEO_INPUT_FORMAT_CHANGED
Deprecated.The format consumed by a video renderer changed.static int
EVENT_VIDEO_SIZE_CHANGED
Deprecated.The video size changed.static int
EVENT_VOLUME_CHANGED
Deprecated.The volume changed.
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
onAudioAttributesChanged(AnalyticsListener.EventTime eventTime, AudioAttributes audioAttributes)
Deprecated.Called when the audio attributes change.default void
onAudioCodecError(AnalyticsListener.EventTime eventTime, Exception audioCodecError)
Deprecated.Called when an audio decoder encounters an error.default void
onAudioDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.default void
onAudioDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializedTimestampMs, long initializationDurationMs)
Deprecated.Called when an audio renderer creates a decoder.default void
onAudioDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Called when an audio renderer releases a decoder.default void
onAudioDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when an audio renderer is disabled.default void
onAudioEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when an audio renderer is enabled.default void
onAudioInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format)
Deprecated.default void
onAudioInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Called when the format of the media being consumed by an audio renderer changes.default void
onAudioPositionAdvancing(AnalyticsListener.EventTime eventTime, long playoutStartSystemTimeMs)
Deprecated.Called when the audio position has increased for the first time since the last pause or position reset.default void
onAudioSessionIdChanged(AnalyticsListener.EventTime eventTime, int audioSessionId)
Deprecated.Called when the audio session ID changes.default void
onAudioSinkError(AnalyticsListener.EventTime eventTime, Exception audioSinkError)
Deprecated.Called whenAudioSink
has encountered an error.default void
onAudioUnderrun(AnalyticsListener.EventTime eventTime, int bufferSize, long bufferSizeMs, long elapsedSinceLastFeedMs)
Deprecated.Called when an audio underrun occurs.default void
onAvailableCommandsChanged(AnalyticsListener.EventTime eventTime, Player.Commands availableCommands)
Deprecated.Called when the player's available commands changed.default void
onBandwidthEstimate(AnalyticsListener.EventTime eventTime, int totalLoadTimeMs, long totalBytesLoaded, long bitrateEstimate)
Deprecated.Called when the bandwidth estimate for the current data source has been updated.default void
onCues(AnalyticsListener.EventTime eventTime, CueGroup cueGroup)
Deprecated.Called when there is a change in theCueGroup
.default void
onCues(AnalyticsListener.EventTime eventTime, List<Cue> cues)
Deprecated.UseonCues(EventTime, CueGroup)
instead.default void
onDeviceInfoChanged(AnalyticsListener.EventTime eventTime, DeviceInfo deviceInfo)
Deprecated.Called when the device information changesdefault void
onDeviceVolumeChanged(AnalyticsListener.EventTime eventTime, int volume, boolean muted)
Deprecated.Called when the device volume or mute state changes.default void
onDownstreamFormatChanged(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Called when the downstream format sent to the renderers changed.default void
onDrmKeysLoaded(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time drm keys are loaded.default void
onDrmKeysRemoved(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time offline drm keys are removed.default void
onDrmKeysRestored(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time offline drm keys are restored.default void
onDrmSessionAcquired(AnalyticsListener.EventTime eventTime)
Deprecated.ImplementonDrmSessionAcquired(EventTime, int)
instead.default void
onDrmSessionAcquired(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.drm.DrmSession.State int state)
Deprecated.Called each time a drm session is acquired.default void
onDrmSessionManagerError(AnalyticsListener.EventTime eventTime, Exception error)
Deprecated.Called when a drm error occurs.default void
onDrmSessionReleased(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time a drm session is released.default void
onDroppedVideoFrames(AnalyticsListener.EventTime eventTime, int droppedFrames, long elapsedMs)
Deprecated.Called after video frames have been dropped.default void
onEvents(Player player, AnalyticsListener.Events events)
Deprecated.Called after one or more events occurred.default void
onIsLoadingChanged(AnalyticsListener.EventTime eventTime, boolean isLoading)
Deprecated.Called when the player starts or stops loading data from a source.default void
onIsPlayingChanged(AnalyticsListener.EventTime eventTime, boolean isPlaying)
Deprecated.Called when the player starts or stops playing.default void
onLoadCanceled(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source canceled loading data.default void
onLoadCompleted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source completed loading data.default void
onLoadError(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData, IOException error, boolean wasCanceled)
Deprecated.Called when a media source loading error occurred.default void
onLoadingChanged(AnalyticsListener.EventTime eventTime, boolean isLoading)
Deprecated.UseonIsLoadingChanged(EventTime, boolean)
instead.default void
onLoadStarted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source started loading data.default void
onMaxSeekToPreviousPositionChanged(AnalyticsListener.EventTime eventTime, long maxSeekToPreviousPositionMs)
Deprecated.Called when the maximum position for whichPlayer.seekToPrevious()
seeks to the previous window changes.default void
onMediaItemTransition(AnalyticsListener.EventTime eventTime, MediaItem mediaItem, @com.google.android.exoplayer2.Player.MediaItemTransitionReason int reason)
Deprecated.Called when playback transitions to a different media item.default void
onMediaMetadataChanged(AnalyticsListener.EventTime eventTime, MediaMetadata mediaMetadata)
Deprecated.Called when the combinedMediaMetadata
changes.default void
onMetadata(AnalyticsListener.EventTime eventTime, Metadata metadata)
Deprecated.Called when there isMetadata
associated with the current playback time.default void
onPlaybackParametersChanged(AnalyticsListener.EventTime eventTime, PlaybackParameters playbackParameters)
Deprecated.Called when the playback parameters changed.default void
onPlaybackStateChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.State int state)
Deprecated.Called when the playback state changed.default void
onPlaybackSuppressionReasonChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)
Deprecated.Called when playback suppression reason changed.default void
onPlayerError(AnalyticsListener.EventTime eventTime, PlaybackException error)
Deprecated.Called when a fatal player error occurred.default void
onPlayerErrorChanged(AnalyticsListener.EventTime eventTime, PlaybackException error)
Deprecated.Called when thePlaybackException
returned byPlayer.getPlayerError()
changes.default void
onPlayerReleased(AnalyticsListener.EventTime eventTime)
Deprecated.Called when thePlayer
is released.default void
onPlayerStateChanged(AnalyticsListener.EventTime eventTime, boolean playWhenReady, @com.google.android.exoplayer2.Player.State int playbackState)
Deprecated.default void
onPlaylistMetadataChanged(AnalyticsListener.EventTime eventTime, MediaMetadata playlistMetadata)
Deprecated.Called when the playlistMediaMetadata
changes.default void
onPlayWhenReadyChanged(AnalyticsListener.EventTime eventTime, boolean playWhenReady, @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)
Deprecated.Called when the value changed that indicates whether playback will proceed when ready.default void
onPositionDiscontinuity(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)
Deprecated.default void
onPositionDiscontinuity(AnalyticsListener.EventTime eventTime, Player.PositionInfo oldPosition, Player.PositionInfo newPosition, @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)
Deprecated.Called when a position discontinuity occurred.default void
onRenderedFirstFrame(AnalyticsListener.EventTime eventTime, Object output, long renderTimeMs)
Deprecated.Called when a frame is rendered for the first time since setting the surface, or since the renderer was reset, or since the stream being rendered was changed.default void
onRepeatModeChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
Deprecated.Called when the repeat mode changed.default void
onSeekBackIncrementChanged(AnalyticsListener.EventTime eventTime, long seekBackIncrementMs)
Deprecated.Called when the seek back increment changed.default void
onSeekForwardIncrementChanged(AnalyticsListener.EventTime eventTime, long seekForwardIncrementMs)
Deprecated.Called when the seek forward increment changed.default void
onSeekStarted(AnalyticsListener.EventTime eventTime)
Deprecated.UseonPositionDiscontinuity(EventTime, Player.PositionInfo, Player.PositionInfo, int)
instead, listening to changes withPlayer.DISCONTINUITY_REASON_SEEK
.default void
onShuffleModeChanged(AnalyticsListener.EventTime eventTime, boolean shuffleModeEnabled)
Deprecated.Called when the shuffle mode changed.default void
onSkipSilenceEnabledChanged(AnalyticsListener.EventTime eventTime, boolean skipSilenceEnabled)
Deprecated.Called when skipping silences is enabled or disabled in the audio stream.default void
onSurfaceSizeChanged(AnalyticsListener.EventTime eventTime, int width, int height)
Deprecated.Called when the output surface size changed.default void
onTimelineChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)
Deprecated.Called when the timeline changed.default void
onTracksChanged(AnalyticsListener.EventTime eventTime, Tracks tracks)
Deprecated.Called when the tracks change.default void
onTrackSelectionParametersChanged(AnalyticsListener.EventTime eventTime, TrackSelectionParameters trackSelectionParameters)
Deprecated.Called when track selection parameters change.default void
onUpstreamDiscarded(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Called when data is removed from the back of a media buffer, typically so that it can be re-buffered in a different format.default void
onVideoCodecError(AnalyticsListener.EventTime eventTime, Exception videoCodecError)
Deprecated.Called when a video decoder encounters an error.default void
onVideoDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.default void
onVideoDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializedTimestampMs, long initializationDurationMs)
Deprecated.Called when a video renderer creates a decoder.default void
onVideoDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Called when a video renderer releases a decoder.default void
onVideoDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when a video renderer is disabled.default void
onVideoEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when a video renderer is enabled.default void
onVideoFrameProcessingOffset(AnalyticsListener.EventTime eventTime, long totalProcessingOffsetUs, int frameCount)
Deprecated.Called when there is an update to the video frame processing offset reported by a video renderer.default void
onVideoInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format)
Deprecated.default void
onVideoInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Called when the format of the media being consumed by a video renderer changes.default void
onVideoSizeChanged(AnalyticsListener.EventTime eventTime, int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio)
Deprecated.ImplementonVideoSizeChanged(EventTime eventTime, VideoSize)
instead.default void
onVideoSizeChanged(AnalyticsListener.EventTime eventTime, VideoSize videoSize)
Deprecated.Called before a frame is rendered for the first time since setting the surface, and each time there's a change in the size or pixel aspect ratio of the video being rendered.default void
onVolumeChanged(AnalyticsListener.EventTime eventTime, float volume)
Deprecated.Called when the volume changes.
-
-
-
Field Detail
-
EVENT_TIMELINE_CHANGED
static final int EVENT_TIMELINE_CHANGED
Deprecated.Player.getCurrentTimeline()
changed.- See Also:
- Constant Field Values
-
EVENT_MEDIA_ITEM_TRANSITION
static final int EVENT_MEDIA_ITEM_TRANSITION
Deprecated.Player.getCurrentMediaItem()
changed or the player started repeating the current item.- See Also:
- Constant Field Values
-
EVENT_TRACKS_CHANGED
static final int EVENT_TRACKS_CHANGED
Deprecated.Player.getCurrentTracks()
changed.- See Also:
- Constant Field Values
-
EVENT_IS_LOADING_CHANGED
static final int EVENT_IS_LOADING_CHANGED
Deprecated.Player.isLoading()
()} changed.- See Also:
- Constant Field Values
-
EVENT_PLAYBACK_STATE_CHANGED
static final int EVENT_PLAYBACK_STATE_CHANGED
Deprecated.Player.getPlaybackState()
changed.- See Also:
- Constant Field Values
-
EVENT_PLAY_WHEN_READY_CHANGED
static final int EVENT_PLAY_WHEN_READY_CHANGED
Deprecated.Player.getPlayWhenReady()
changed.- See Also:
- Constant Field Values
-
EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED
static final int EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED
Deprecated.- See Also:
- Constant Field Values
-
EVENT_IS_PLAYING_CHANGED
static final int EVENT_IS_PLAYING_CHANGED
Deprecated.Player.isPlaying()
changed.- See Also:
- Constant Field Values
-
EVENT_REPEAT_MODE_CHANGED
static final int EVENT_REPEAT_MODE_CHANGED
Deprecated.Player.getRepeatMode()
changed.- See Also:
- Constant Field Values
-
EVENT_SHUFFLE_MODE_ENABLED_CHANGED
static final int EVENT_SHUFFLE_MODE_ENABLED_CHANGED
Deprecated.Player.getShuffleModeEnabled()
changed.- See Also:
- Constant Field Values
-
EVENT_PLAYER_ERROR
static final int EVENT_PLAYER_ERROR
Deprecated.Player.getPlayerError()
changed.- See Also:
- Constant Field Values
-
EVENT_POSITION_DISCONTINUITY
static final int EVENT_POSITION_DISCONTINUITY
Deprecated.A position discontinuity occurred. SeePlayer.Listener.onPositionDiscontinuity(Player.PositionInfo, Player.PositionInfo, int)
.- See Also:
- Constant Field Values
-
EVENT_PLAYBACK_PARAMETERS_CHANGED
static final int EVENT_PLAYBACK_PARAMETERS_CHANGED
Deprecated.Player.getPlaybackParameters()
changed.- See Also:
- Constant Field Values
-
EVENT_AVAILABLE_COMMANDS_CHANGED
static final int EVENT_AVAILABLE_COMMANDS_CHANGED
Deprecated.Player.getAvailableCommands()
changed.- See Also:
- Constant Field Values
-
EVENT_MEDIA_METADATA_CHANGED
static final int EVENT_MEDIA_METADATA_CHANGED
Deprecated.Player.getMediaMetadata()
changed.- See Also:
- Constant Field Values
-
EVENT_PLAYLIST_METADATA_CHANGED
static final int EVENT_PLAYLIST_METADATA_CHANGED
Deprecated.Player.getPlaylistMetadata()
changed.- See Also:
- Constant Field Values
-
EVENT_SEEK_BACK_INCREMENT_CHANGED
static final int EVENT_SEEK_BACK_INCREMENT_CHANGED
Deprecated.Player.getSeekBackIncrement()
changed.- See Also:
- Constant Field Values
-
EVENT_SEEK_FORWARD_INCREMENT_CHANGED
static final int EVENT_SEEK_FORWARD_INCREMENT_CHANGED
Deprecated.Player.getSeekForwardIncrement()
changed.- See Also:
- Constant Field Values
-
EVENT_MAX_SEEK_TO_PREVIOUS_POSITION_CHANGED
static final int EVENT_MAX_SEEK_TO_PREVIOUS_POSITION_CHANGED
Deprecated.- See Also:
- Constant Field Values
-
EVENT_TRACK_SELECTION_PARAMETERS_CHANGED
static final int EVENT_TRACK_SELECTION_PARAMETERS_CHANGED
Deprecated.Player.getTrackSelectionParameters()
changed.- See Also:
- Constant Field Values
-
EVENT_AUDIO_ATTRIBUTES_CHANGED
static final int EVENT_AUDIO_ATTRIBUTES_CHANGED
Deprecated.Audio attributes changed.- See Also:
- Constant Field Values
-
EVENT_AUDIO_SESSION_ID
static final int EVENT_AUDIO_SESSION_ID
Deprecated.An audio session id was set.- See Also:
- Constant Field Values
-
EVENT_VOLUME_CHANGED
static final int EVENT_VOLUME_CHANGED
Deprecated.The volume changed.- See Also:
- Constant Field Values
-
EVENT_SKIP_SILENCE_ENABLED_CHANGED
static final int EVENT_SKIP_SILENCE_ENABLED_CHANGED
Deprecated.Skipping silences was enabled or disabled in the audio stream.- See Also:
- Constant Field Values
-
EVENT_SURFACE_SIZE_CHANGED
static final int EVENT_SURFACE_SIZE_CHANGED
Deprecated.The surface size changed.- See Also:
- Constant Field Values
-
EVENT_VIDEO_SIZE_CHANGED
static final int EVENT_VIDEO_SIZE_CHANGED
Deprecated.The video size changed.- See Also:
- Constant Field Values
-
EVENT_RENDERED_FIRST_FRAME
static final int EVENT_RENDERED_FIRST_FRAME
Deprecated.The first frame has been rendered since setting the surface, since the renderer was reset or since the stream changed.- See Also:
- Constant Field Values
-
EVENT_METADATA
static final int EVENT_METADATA
Deprecated.Metadata associated with the current playback time was reported.- See Also:
- Constant Field Values
-
EVENT_CUES
static final int EVENT_CUES
Deprecated.Player.getCurrentCues()
changed.- See Also:
- Constant Field Values
-
EVENT_DEVICE_INFO_CHANGED
static final int EVENT_DEVICE_INFO_CHANGED
Deprecated.Player.getDeviceInfo()
changed.- See Also:
- Constant Field Values
-
EVENT_DEVICE_VOLUME_CHANGED
static final int EVENT_DEVICE_VOLUME_CHANGED
Deprecated.Player.getDeviceVolume()
changed.- See Also:
- Constant Field Values
-
EVENT_LOAD_STARTED
static final int EVENT_LOAD_STARTED
Deprecated.A source started loading data.- See Also:
- Constant Field Values
-
EVENT_LOAD_COMPLETED
static final int EVENT_LOAD_COMPLETED
Deprecated.A source started completed loading data.- See Also:
- Constant Field Values
-
EVENT_LOAD_CANCELED
static final int EVENT_LOAD_CANCELED
Deprecated.A source canceled loading data.- See Also:
- Constant Field Values
-
EVENT_LOAD_ERROR
static final int EVENT_LOAD_ERROR
Deprecated.A source had a non-fatal error loading data.- See Also:
- Constant Field Values
-
EVENT_DOWNSTREAM_FORMAT_CHANGED
static final int EVENT_DOWNSTREAM_FORMAT_CHANGED
Deprecated.The downstream format sent to renderers changed.- See Also:
- Constant Field Values
-
EVENT_UPSTREAM_DISCARDED
static final int EVENT_UPSTREAM_DISCARDED
Deprecated.Data was removed from the end of the media buffer.- See Also:
- Constant Field Values
-
EVENT_BANDWIDTH_ESTIMATE
static final int EVENT_BANDWIDTH_ESTIMATE
Deprecated.The bandwidth estimate has been updated.- See Also:
- Constant Field Values
-
EVENT_AUDIO_ENABLED
static final int EVENT_AUDIO_ENABLED
Deprecated.An audio renderer was enabled.- See Also:
- Constant Field Values
-
EVENT_AUDIO_DECODER_INITIALIZED
static final int EVENT_AUDIO_DECODER_INITIALIZED
Deprecated.An audio renderer created a decoder.- See Also:
- Constant Field Values
-
EVENT_AUDIO_INPUT_FORMAT_CHANGED
static final int EVENT_AUDIO_INPUT_FORMAT_CHANGED
Deprecated.The format consumed by an audio renderer changed.- See Also:
- Constant Field Values
-
EVENT_AUDIO_POSITION_ADVANCING
static final int EVENT_AUDIO_POSITION_ADVANCING
Deprecated.The audio position has increased for the first time since the last pause or position reset.- See Also:
- Constant Field Values
-
EVENT_AUDIO_UNDERRUN
static final int EVENT_AUDIO_UNDERRUN
Deprecated.An audio underrun occurred.- See Also:
- Constant Field Values
-
EVENT_AUDIO_DECODER_RELEASED
static final int EVENT_AUDIO_DECODER_RELEASED
Deprecated.An audio renderer released a decoder.- See Also:
- Constant Field Values
-
EVENT_AUDIO_DISABLED
static final int EVENT_AUDIO_DISABLED
Deprecated.An audio renderer was disabled.- See Also:
- Constant Field Values
-
EVENT_AUDIO_SINK_ERROR
static final int EVENT_AUDIO_SINK_ERROR
Deprecated.The audio sink encountered a non-fatal error.- See Also:
- Constant Field Values
-
EVENT_VIDEO_ENABLED
static final int EVENT_VIDEO_ENABLED
Deprecated.A video renderer was enabled.- See Also:
- Constant Field Values
-
EVENT_VIDEO_DECODER_INITIALIZED
static final int EVENT_VIDEO_DECODER_INITIALIZED
Deprecated.A video renderer created a decoder.- See Also:
- Constant Field Values
-
EVENT_VIDEO_INPUT_FORMAT_CHANGED
static final int EVENT_VIDEO_INPUT_FORMAT_CHANGED
Deprecated.The format consumed by a video renderer changed.- See Also:
- Constant Field Values
-
EVENT_DROPPED_VIDEO_FRAMES
static final int EVENT_DROPPED_VIDEO_FRAMES
Deprecated.Video frames have been dropped.- See Also:
- Constant Field Values
-
EVENT_VIDEO_DECODER_RELEASED
static final int EVENT_VIDEO_DECODER_RELEASED
Deprecated.A video renderer released a decoder.- See Also:
- Constant Field Values
-
EVENT_VIDEO_DISABLED
static final int EVENT_VIDEO_DISABLED
Deprecated.A video renderer was disabled.- See Also:
- Constant Field Values
-
EVENT_VIDEO_FRAME_PROCESSING_OFFSET
static final int EVENT_VIDEO_FRAME_PROCESSING_OFFSET
Deprecated.Video frame processing offset data has been reported.- See Also:
- Constant Field Values
-
EVENT_DRM_SESSION_ACQUIRED
static final int EVENT_DRM_SESSION_ACQUIRED
Deprecated.A DRM session has been acquired.- See Also:
- Constant Field Values
-
EVENT_DRM_KEYS_LOADED
static final int EVENT_DRM_KEYS_LOADED
Deprecated.DRM keys were loaded.- See Also:
- Constant Field Values
-
EVENT_DRM_SESSION_MANAGER_ERROR
static final int EVENT_DRM_SESSION_MANAGER_ERROR
Deprecated.A non-fatal DRM session manager error occurred.- See Also:
- Constant Field Values
-
EVENT_DRM_KEYS_RESTORED
static final int EVENT_DRM_KEYS_RESTORED
Deprecated.DRM keys were restored.- See Also:
- Constant Field Values
-
EVENT_DRM_KEYS_REMOVED
static final int EVENT_DRM_KEYS_REMOVED
Deprecated.DRM keys were removed.- See Also:
- Constant Field Values
-
EVENT_DRM_SESSION_RELEASED
static final int EVENT_DRM_SESSION_RELEASED
Deprecated.A DRM session has been released.- See Also:
- Constant Field Values
-
EVENT_PLAYER_RELEASED
static final int EVENT_PLAYER_RELEASED
Deprecated.The player was released.- See Also:
- Constant Field Values
-
EVENT_AUDIO_CODEC_ERROR
static final int EVENT_AUDIO_CODEC_ERROR
Deprecated.The audio codec encountered an error.- See Also:
- Constant Field Values
-
EVENT_VIDEO_CODEC_ERROR
static final int EVENT_VIDEO_CODEC_ERROR
Deprecated.The video codec encountered an error.- See Also:
- Constant Field Values
-
-
Method Detail
-
onPlayerStateChanged
@Deprecated default void onPlayerStateChanged(AnalyticsListener.EventTime eventTime, boolean playWhenReady, @State @com.google.android.exoplayer2.Player.State int playbackState)
Deprecated.
-
onPlaybackStateChanged
default void onPlaybackStateChanged(AnalyticsListener.EventTime eventTime, @State @com.google.android.exoplayer2.Player.State int state)
Deprecated.Called when the playback state changed.- Parameters:
eventTime
- The event time.state
- The newplayback state
.
-
onPlayWhenReadyChanged
default void onPlayWhenReadyChanged(AnalyticsListener.EventTime eventTime, boolean playWhenReady, @PlayWhenReadyChangeReason @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)
Deprecated.Called when the value changed that indicates whether playback will proceed when ready.- Parameters:
eventTime
- The event time.playWhenReady
- Whether playback will proceed when ready.reason
- Thereason
of the change.
-
onPlaybackSuppressionReasonChanged
default void onPlaybackSuppressionReasonChanged(AnalyticsListener.EventTime eventTime, @PlaybackSuppressionReason @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)
Deprecated.Called when playback suppression reason changed.- Parameters:
eventTime
- The event time.playbackSuppressionReason
- The newPlayer.PlaybackSuppressionReason
.
-
onIsPlayingChanged
default void onIsPlayingChanged(AnalyticsListener.EventTime eventTime, boolean isPlaying)
Deprecated.Called when the player starts or stops playing.- Parameters:
eventTime
- The event time.isPlaying
- Whether the player is playing.
-
onTimelineChanged
default void onTimelineChanged(AnalyticsListener.EventTime eventTime, @TimelineChangeReason @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)
Deprecated.Called when the timeline changed.- Parameters:
eventTime
- The event time.reason
- The reason for the timeline change.
-
onMediaItemTransition
default void onMediaItemTransition(AnalyticsListener.EventTime eventTime, @Nullable MediaItem mediaItem, @MediaItemTransitionReason @com.google.android.exoplayer2.Player.MediaItemTransitionReason int reason)
Deprecated.Called when playback transitions to a different media item.- Parameters:
eventTime
- The event time.mediaItem
- The media item.reason
- The reason for the media item transition.
-
onPositionDiscontinuity
@Deprecated default void onPositionDiscontinuity(AnalyticsListener.EventTime eventTime, @DiscontinuityReason @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)
Deprecated.
-
onPositionDiscontinuity
default void onPositionDiscontinuity(AnalyticsListener.EventTime eventTime, Player.PositionInfo oldPosition, Player.PositionInfo newPosition, @DiscontinuityReason @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)
Deprecated.Called when a position discontinuity occurred.- Parameters:
eventTime
- The event time.oldPosition
- The position before the discontinuity.newPosition
- The position after the discontinuity.reason
- The reason for the position discontinuity.
-
onSeekStarted
@Deprecated default void onSeekStarted(AnalyticsListener.EventTime eventTime)
Deprecated.UseonPositionDiscontinuity(EventTime, Player.PositionInfo, Player.PositionInfo, int)
instead, listening to changes withPlayer.DISCONTINUITY_REASON_SEEK
.
-
onPlaybackParametersChanged
default void onPlaybackParametersChanged(AnalyticsListener.EventTime eventTime, PlaybackParameters playbackParameters)
Deprecated.Called when the playback parameters changed.- Parameters:
eventTime
- The event time.playbackParameters
- The new playback parameters.
-
onSeekBackIncrementChanged
default void onSeekBackIncrementChanged(AnalyticsListener.EventTime eventTime, long seekBackIncrementMs)
Deprecated.Called when the seek back increment changed.- Parameters:
eventTime
- The event time.seekBackIncrementMs
- The seek back increment, in milliseconds.
-
onSeekForwardIncrementChanged
default void onSeekForwardIncrementChanged(AnalyticsListener.EventTime eventTime, long seekForwardIncrementMs)
Deprecated.Called when the seek forward increment changed.- Parameters:
eventTime
- The event time.seekForwardIncrementMs
- The seek forward increment, in milliseconds.
-
onMaxSeekToPreviousPositionChanged
default void onMaxSeekToPreviousPositionChanged(AnalyticsListener.EventTime eventTime, long maxSeekToPreviousPositionMs)
Deprecated.Called when the maximum position for whichPlayer.seekToPrevious()
seeks to the previous window changes.- Parameters:
eventTime
- The event time.maxSeekToPreviousPositionMs
- The maximum seek to previous position, in milliseconds.
-
onRepeatModeChanged
default void onRepeatModeChanged(AnalyticsListener.EventTime eventTime, @RepeatMode @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
Deprecated.Called when the repeat mode changed.- Parameters:
eventTime
- The event time.repeatMode
- The new repeat mode.
-
onShuffleModeChanged
default void onShuffleModeChanged(AnalyticsListener.EventTime eventTime, boolean shuffleModeEnabled)
Deprecated.Called when the shuffle mode changed.- Parameters:
eventTime
- The event time.shuffleModeEnabled
- Whether the shuffle mode is enabled.
-
onIsLoadingChanged
default void onIsLoadingChanged(AnalyticsListener.EventTime eventTime, boolean isLoading)
Deprecated.Called when the player starts or stops loading data from a source.- Parameters:
eventTime
- The event time.isLoading
- Whether the player is loading.
-
onLoadingChanged
@Deprecated default void onLoadingChanged(AnalyticsListener.EventTime eventTime, boolean isLoading)
Deprecated.UseonIsLoadingChanged(EventTime, boolean)
instead.
-
onAvailableCommandsChanged
default void onAvailableCommandsChanged(AnalyticsListener.EventTime eventTime, Player.Commands availableCommands)
Deprecated.Called when the player's available commands changed.- Parameters:
eventTime
- The event time.availableCommands
- The available commands.
-
onPlayerError
default void onPlayerError(AnalyticsListener.EventTime eventTime, PlaybackException error)
Deprecated.Called when a fatal player error occurred.Implementations of
Player
may pass an instance of a subclass ofPlaybackException
to this method in order to include more information about the error.- Parameters:
eventTime
- The event time.error
- The error.
-
onPlayerErrorChanged
default void onPlayerErrorChanged(AnalyticsListener.EventTime eventTime, @Nullable PlaybackException error)
Deprecated.Called when thePlaybackException
returned byPlayer.getPlayerError()
changes.Implementations of Player may pass an instance of a subclass of
PlaybackException
to this method in order to include more information about the error.- Parameters:
eventTime
- The event time.error
- The new error, or null if the error is being cleared.
-
onTracksChanged
default void onTracksChanged(AnalyticsListener.EventTime eventTime, Tracks tracks)
Deprecated.Called when the tracks change.- Parameters:
eventTime
- The event time.tracks
- The tracks. Never null, but may be of length zero.
-
onTrackSelectionParametersChanged
default void onTrackSelectionParametersChanged(AnalyticsListener.EventTime eventTime, TrackSelectionParameters trackSelectionParameters)
Deprecated.Called when track selection parameters change.- Parameters:
eventTime
- The event time.trackSelectionParameters
- The newTrackSelectionParameters
.
-
onMediaMetadataChanged
default void onMediaMetadataChanged(AnalyticsListener.EventTime eventTime, MediaMetadata mediaMetadata)
Deprecated.Called when the combinedMediaMetadata
changes.The provided
MediaMetadata
is a combination of theMediaItem.mediaMetadata
and the static and dynamic metadata from thetrack selections' formats
andMetadataOutput.onMetadata(Metadata)
.- Parameters:
eventTime
- The event time.mediaMetadata
- The combinedMediaMetadata
.
-
onPlaylistMetadataChanged
default void onPlaylistMetadataChanged(AnalyticsListener.EventTime eventTime, MediaMetadata playlistMetadata)
Deprecated.Called when the playlistMediaMetadata
changes.- Parameters:
eventTime
- The event time.playlistMetadata
- The playlistMediaMetadata
.
-
onLoadStarted
default void onLoadStarted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source started loading data.- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.
-
onLoadCompleted
default void onLoadCompleted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source completed loading data.- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.
-
onLoadCanceled
default void onLoadCanceled(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source canceled loading data.- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.
-
onLoadError
default void onLoadError(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData, IOException error, boolean wasCanceled)
Deprecated.Called when a media source loading error occurred.This method being called does not indicate that playback has failed, or that it will fail. The player may be able to recover from the error. Hence applications should not implement this method to display a user visible error or initiate an application level retry.
Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException)
is the appropriate place to implement such behavior. This method is called to provide the application with an opportunity to log the error if it wishes to do so.- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.error
- The load error.wasCanceled
- Whether the load was canceled as a result of the error.
-
onDownstreamFormatChanged
default void onDownstreamFormatChanged(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Called when the downstream format sent to the renderers changed.- Parameters:
eventTime
- The event time.mediaLoadData
- TheMediaLoadData
defining the newly selected media data.
-
onUpstreamDiscarded
default void onUpstreamDiscarded(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Called when data is removed from the back of a media buffer, typically so that it can be re-buffered in a different format.- Parameters:
eventTime
- The event time.mediaLoadData
- TheMediaLoadData
defining the media being discarded.
-
onBandwidthEstimate
default void onBandwidthEstimate(AnalyticsListener.EventTime eventTime, int totalLoadTimeMs, long totalBytesLoaded, long bitrateEstimate)
Deprecated.Called when the bandwidth estimate for the current data source has been updated.- Parameters:
eventTime
- The event time.totalLoadTimeMs
- The total time spend loading this update is based on, in milliseconds.totalBytesLoaded
- The total bytes loaded this update is based on.bitrateEstimate
- The bandwidth estimate, in bits per second.
-
onMetadata
default void onMetadata(AnalyticsListener.EventTime eventTime, Metadata metadata)
Deprecated.Called when there isMetadata
associated with the current playback time.- Parameters:
eventTime
- The event time.metadata
- The metadata.
-
onCues
@Deprecated default void onCues(AnalyticsListener.EventTime eventTime, List<Cue> cues)
Deprecated.UseonCues(EventTime, CueGroup)
instead.Called when there is a change in theCues
.Both
onCues(EventTime, List)
andonCues(EventTime, CueGroup)
are called when there is a change in the cues. You should only implement one or the other.- Parameters:
eventTime
- The event time.cues
- TheCues
.
-
onCues
default void onCues(AnalyticsListener.EventTime eventTime, CueGroup cueGroup)
Deprecated.Called when there is a change in theCueGroup
.Both
onCues(EventTime, List)
andonCues(EventTime, CueGroup)
are called when there is a change in the cues. You should only implement one or the other.- Parameters:
eventTime
- The event time.cueGroup
- TheCueGroup
.
-
onAudioEnabled
default void onAudioEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when an audio renderer is enabled.- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that will be updated by the renderer for as long as it remains enabled.
-
onAudioDecoderInitialized
default void onAudioDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializedTimestampMs, long initializationDurationMs)
Deprecated.Called when an audio renderer creates a decoder.- Parameters:
eventTime
- The event time.decoderName
- The decoder that was created.initializedTimestampMs
-SystemClock.elapsedRealtime()
when initialization finished.initializationDurationMs
- The time taken to initialize the decoder in milliseconds.
-
onAudioDecoderInitialized
@Deprecated default void onAudioDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.
-
onAudioInputFormatChanged
@Deprecated default void onAudioInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format)
Deprecated.
-
onAudioInputFormatChanged
default void onAudioInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, @Nullable DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Called when the format of the media being consumed by an audio renderer changes.- Parameters:
eventTime
- The event time.format
- The new format.decoderReuseEvaluation
- The result of the evaluation to determine whether an existing decoder instance can be reused for the new format, ornull
if the renderer did not have a decoder.
-
onAudioPositionAdvancing
default void onAudioPositionAdvancing(AnalyticsListener.EventTime eventTime, long playoutStartSystemTimeMs)
Deprecated.Called when the audio position has increased for the first time since the last pause or position reset.- Parameters:
eventTime
- The event time.playoutStartSystemTimeMs
- The approximate derivedSystem.currentTimeMillis()
at which playout started.
-
onAudioUnderrun
default void onAudioUnderrun(AnalyticsListener.EventTime eventTime, int bufferSize, long bufferSizeMs, long elapsedSinceLastFeedMs)
Deprecated.Called when an audio underrun occurs.- Parameters:
eventTime
- The event time.bufferSize
- The size of the audio output buffer, in bytes.bufferSizeMs
- The size of the audio output buffer, in milliseconds, if it contains PCM encoded audio.C.TIME_UNSET
if the output buffer contains non-PCM encoded audio.elapsedSinceLastFeedMs
- The time since audio was last written to the output buffer.
-
onAudioDecoderReleased
default void onAudioDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Called when an audio renderer releases a decoder.- Parameters:
eventTime
- The event time.decoderName
- The decoder that was released.
-
onAudioDisabled
default void onAudioDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when an audio renderer is disabled.- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that were updated by the renderer.
-
onAudioSessionIdChanged
default void onAudioSessionIdChanged(AnalyticsListener.EventTime eventTime, int audioSessionId)
Deprecated.Called when the audio session ID changes.- Parameters:
eventTime
- The event time.audioSessionId
- The audio session ID.
-
onAudioAttributesChanged
default void onAudioAttributesChanged(AnalyticsListener.EventTime eventTime, AudioAttributes audioAttributes)
Deprecated.Called when the audio attributes change.- Parameters:
eventTime
- The event time.audioAttributes
- The audio attributes.
-
onSkipSilenceEnabledChanged
default void onSkipSilenceEnabledChanged(AnalyticsListener.EventTime eventTime, boolean skipSilenceEnabled)
Deprecated.Called when skipping silences is enabled or disabled in the audio stream.- Parameters:
eventTime
- The event time.skipSilenceEnabled
- Whether skipping silences in the audio stream is enabled.
-
onAudioSinkError
default void onAudioSinkError(AnalyticsListener.EventTime eventTime, Exception audioSinkError)
Deprecated.Called whenAudioSink
has encountered an error.This method being called does not indicate that playback has failed, or that it will fail. The player may be able to recover from the error. Hence applications should not implement this method to display a user visible error or initiate an application level retry.
Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException)
is the appropriate place to implement such behavior. This method is called to provide the application with an opportunity to log the error if it wishes to do so.- Parameters:
eventTime
- The event time.audioSinkError
- The error that occurred. Typically anAudioSink.InitializationException
, aAudioSink.WriteException
, or anAudioSink.UnexpectedDiscontinuityException
.
-
onAudioCodecError
default void onAudioCodecError(AnalyticsListener.EventTime eventTime, Exception audioCodecError)
Deprecated.Called when an audio decoder encounters an error.This method being called does not indicate that playback has failed, or that it will fail. The player may be able to recover from the error. Hence applications should not implement this method to display a user visible error or initiate an application level retry.
Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException)
is the appropriate place to implement such behavior. This method is called to provide the application with an opportunity to log the error if it wishes to do so.- Parameters:
eventTime
- The event time.audioCodecError
- The error. Typically aMediaCodec.CodecException
if the renderer usesMediaCodec
, or aDecoderException
if the renderer uses a software decoder.
-
onVolumeChanged
default void onVolumeChanged(AnalyticsListener.EventTime eventTime, float volume)
Deprecated.Called when the volume changes.- Parameters:
eventTime
- The event time.volume
- The new volume, with 0 being silence and 1 being unity gain.
-
onDeviceInfoChanged
default void onDeviceInfoChanged(AnalyticsListener.EventTime eventTime, DeviceInfo deviceInfo)
Deprecated.Called when the device information changes- Parameters:
eventTime
- The event time.deviceInfo
- The newDeviceInfo
.
-
onDeviceVolumeChanged
default void onDeviceVolumeChanged(AnalyticsListener.EventTime eventTime, int volume, boolean muted)
Deprecated.Called when the device volume or mute state changes.- Parameters:
eventTime
- The event time.volume
- The new device volume, with 0 being silence and 1 being unity gain.muted
- Whether the device is muted.
-
onVideoEnabled
default void onVideoEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when a video renderer is enabled.- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that will be updated by the renderer for as long as it remains enabled.
-
onVideoDecoderInitialized
default void onVideoDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializedTimestampMs, long initializationDurationMs)
Deprecated.Called when a video renderer creates a decoder.- Parameters:
eventTime
- The event time.decoderName
- The decoder that was created.initializedTimestampMs
-SystemClock.elapsedRealtime()
when initialization finished.initializationDurationMs
- The time taken to initialize the decoder in milliseconds.
-
onVideoDecoderInitialized
@Deprecated default void onVideoDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.
-
onVideoInputFormatChanged
@Deprecated default void onVideoInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format)
Deprecated.
-
onVideoInputFormatChanged
default void onVideoInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, @Nullable DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Called when the format of the media being consumed by a video renderer changes.- Parameters:
eventTime
- The event time.format
- The new format.decoderReuseEvaluation
- The result of the evaluation to determine whether an existing decoder instance can be reused for the new format, ornull
if the renderer did not have a decoder.
-
onDroppedVideoFrames
default void onDroppedVideoFrames(AnalyticsListener.EventTime eventTime, int droppedFrames, long elapsedMs)
Deprecated.Called after video frames have been dropped.- Parameters:
eventTime
- The event time.droppedFrames
- The number of dropped frames since the last call to this method.elapsedMs
- The duration in milliseconds over which the frames were dropped. This duration is timed from when the renderer was started or from when dropped frames were last reported (whichever was more recent), and not from when the first of the reported drops occurred.
-
onVideoDecoderReleased
default void onVideoDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Called when a video renderer releases a decoder.- Parameters:
eventTime
- The event time.decoderName
- The decoder that was released.
-
onVideoDisabled
default void onVideoDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when a video renderer is disabled.- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that were updated by the renderer.
-
onVideoFrameProcessingOffset
default void onVideoFrameProcessingOffset(AnalyticsListener.EventTime eventTime, long totalProcessingOffsetUs, int frameCount)
Deprecated.Called when there is an update to the video frame processing offset reported by a video renderer.The processing offset for a video frame is the difference between the time at which the frame became available to render, and the time at which it was scheduled to be rendered. A positive value indicates the frame became available early enough, whereas a negative value indicates that the frame wasn't available until after the time at which it should have been rendered.
- Parameters:
eventTime
- The event time.totalProcessingOffsetUs
- The sum of the video frame processing offsets for frames rendered since the last call to this method.frameCount
- The number to samples included intotalProcessingOffsetUs
.
-
onVideoCodecError
default void onVideoCodecError(AnalyticsListener.EventTime eventTime, Exception videoCodecError)
Deprecated.Called when a video decoder encounters an error.This method being called does not indicate that playback has failed, or that it will fail. The player may be able to recover from the error. Hence applications should not implement this method to display a user visible error or initiate an application level retry.
Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException)
is the appropriate place to implement such behavior. This method is called to provide the application with an opportunity to log the error if it wishes to do so.- Parameters:
eventTime
- The event time.videoCodecError
- The error. Typically aMediaCodec.CodecException
if the renderer usesMediaCodec
, or aDecoderException
if the renderer uses a software decoder.
-
onRenderedFirstFrame
default void onRenderedFirstFrame(AnalyticsListener.EventTime eventTime, Object output, long renderTimeMs)
Deprecated.Called when a frame is rendered for the first time since setting the surface, or since the renderer was reset, or since the stream being rendered was changed.- Parameters:
eventTime
- The event time.output
- The output to which a frame has been rendered. Normally aSurface
, however may also be other output types (e.g., aVideoDecoderOutputBufferRenderer
).renderTimeMs
-SystemClock.elapsedRealtime()
when the first frame was rendered.
-
onVideoSizeChanged
default void onVideoSizeChanged(AnalyticsListener.EventTime eventTime, VideoSize videoSize)
Deprecated.Called before a frame is rendered for the first time since setting the surface, and each time there's a change in the size or pixel aspect ratio of the video being rendered.- Parameters:
eventTime
- The event time.videoSize
- The new size of the video.
-
onVideoSizeChanged
@Deprecated default void onVideoSizeChanged(AnalyticsListener.EventTime eventTime, int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio)
Deprecated.ImplementonVideoSizeChanged(EventTime eventTime, VideoSize)
instead.
-
onSurfaceSizeChanged
default void onSurfaceSizeChanged(AnalyticsListener.EventTime eventTime, int width, int height)
Deprecated.Called when the output surface size changed.- Parameters:
eventTime
- The event time.width
- The surface width in pixels. May beC.LENGTH_UNSET
if unknown, or 0 if the video is not rendered onto a surface.height
- The surface height in pixels. May beC.LENGTH_UNSET
if unknown, or 0 if the video is not rendered onto a surface.
-
onDrmSessionAcquired
@Deprecated default void onDrmSessionAcquired(AnalyticsListener.EventTime eventTime)
Deprecated.ImplementonDrmSessionAcquired(EventTime, int)
instead.
-
onDrmSessionAcquired
default void onDrmSessionAcquired(AnalyticsListener.EventTime eventTime, @State @com.google.android.exoplayer2.drm.DrmSession.State int state)
Deprecated.Called each time a drm session is acquired.- Parameters:
eventTime
- The event time.state
- TheDrmSession.State
of the session when the acquisition completed.
-
onDrmKeysLoaded
default void onDrmKeysLoaded(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time drm keys are loaded.- Parameters:
eventTime
- The event time.
-
onDrmSessionManagerError
default void onDrmSessionManagerError(AnalyticsListener.EventTime eventTime, Exception error)
Deprecated.Called when a drm error occurs.This method being called does not indicate that playback has failed, or that it will fail. The player may be able to recover from the error. Hence applications should not implement this method to display a user visible error or initiate an application level retry.
Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException)
is the appropriate place to implement such behavior. This method is called to provide the application with an opportunity to log the error if it wishes to do so.- Parameters:
eventTime
- The event time.error
- The error.
-
onDrmKeysRestored
default void onDrmKeysRestored(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time offline drm keys are restored.- Parameters:
eventTime
- The event time.
-
onDrmKeysRemoved
default void onDrmKeysRemoved(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time offline drm keys are removed.- Parameters:
eventTime
- The event time.
-
onDrmSessionReleased
default void onDrmSessionReleased(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time a drm session is released.- Parameters:
eventTime
- The event time.
-
onPlayerReleased
default void onPlayerReleased(AnalyticsListener.EventTime eventTime)
Deprecated.Called when thePlayer
is released.- Parameters:
eventTime
- The event time.
-
onEvents
default void onEvents(Player player, AnalyticsListener.Events events)
Deprecated.Called after one or more events occurred.State changes and events that happen within one
Looper
message queue iteration are reported together and only after all individual callbacks were triggered.Listeners should prefer this method over individual callbacks in the following cases:
- They intend to trigger the same logic for multiple events (e.g. when updating a UI for
both
onPlaybackStateChanged(EventTime, int)
andonPlayWhenReadyChanged(EventTime, boolean, int)
). - They need access to the
Player
object to trigger further events (e.g. to callPlayer.seekTo(long)
after aonMediaItemTransition(EventTime, MediaItem, int)
). - They intend to use multiple state values together or in combination with
Player
getter methods. For example usingPlayer.getCurrentMediaItemIndex()
with thetimeline
provided inonTimelineChanged(EventTime, int)
is only safe from within this method. - They are interested in events that logically happened together (e.g
onPlaybackStateChanged(EventTime, int)
toPlayer.STATE_BUFFERING
because ofonMediaItemTransition(EventTime, MediaItem, int)
).
- Parameters:
player
- ThePlayer
.events
- TheAnalyticsListener.Events
that occurred in this iteration.
- They intend to trigger the same logic for multiple events (e.g. when updating a UI for
both
-
-