Package com.google.android.exoplayer2.util

## Class EventLogger

- java.lang.Object
- - com.google.android.exoplayer2.util.EventLogger

- All Implemented Interfaces:
    `AnalyticsListener`

      public class EventLogger
      extends Object
      implements AnalyticsListener

  Logs events from `Player` and other core components using `Log`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.google.android.exoplayer2.analytics.AnalyticsListener

      `AnalyticsListener.EventFlags, AnalyticsListener.Events, AnalyticsListener.EventTime`

  - ### Field Summary

    - ### Fields inherited from interface com.google.android.exoplayer2.analytics.AnalyticsListener

      `EVENT_AUDIO_ATTRIBUTES_CHANGED, EVENT_AUDIO_CODEC_ERROR, EVENT_AUDIO_DECODER_INITIALIZED, EVENT_AUDIO_DECODER_RELEASED, EVENT_AUDIO_DISABLED, EVENT_AUDIO_ENABLED, EVENT_AUDIO_INPUT_FORMAT_CHANGED, EVENT_AUDIO_POSITION_ADVANCING, EVENT_AUDIO_SESSION_ID, EVENT_AUDIO_SINK_ERROR, EVENT_AUDIO_UNDERRUN, EVENT_AVAILABLE_COMMANDS_CHANGED, EVENT_BANDWIDTH_ESTIMATE, EVENT_CUES, EVENT_DEVICE_INFO_CHANGED, EVENT_DEVICE_VOLUME_CHANGED, EVENT_DOWNSTREAM_FORMAT_CHANGED, EVENT_DRM_KEYS_LOADED, EVENT_DRM_KEYS_REMOVED, EVENT_DRM_KEYS_RESTORED, EVENT_DRM_SESSION_ACQUIRED, EVENT_DRM_SESSION_MANAGER_ERROR, EVENT_DRM_SESSION_RELEASED, EVENT_DROPPED_VIDEO_FRAMES, EVENT_IS_LOADING_CHANGED, EVENT_IS_PLAYING_CHANGED, EVENT_LOAD_CANCELED, EVENT_LOAD_COMPLETED, EVENT_LOAD_ERROR, EVENT_LOAD_STARTED, EVENT_MAX_SEEK_TO_PREVIOUS_POSITION_CHANGED, EVENT_MEDIA_ITEM_TRANSITION, EVENT_MEDIA_METADATA_CHANGED, EVENT_METADATA, EVENT_PLAY_WHEN_READY_CHANGED, EVENT_PLAYBACK_PARAMETERS_CHANGED, EVENT_PLAYBACK_STATE_CHANGED, EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED, EVENT_PLAYER_ERROR, EVENT_PLAYER_RELEASED, EVENT_PLAYLIST_METADATA_CHANGED, EVENT_POSITION_DISCONTINUITY, EVENT_RENDERED_FIRST_FRAME, EVENT_REPEAT_MODE_CHANGED, EVENT_SEEK_BACK_INCREMENT_CHANGED, EVENT_SEEK_FORWARD_INCREMENT_CHANGED, EVENT_SHUFFLE_MODE_ENABLED_CHANGED, EVENT_SKIP_SILENCE_ENABLED_CHANGED, EVENT_SURFACE_SIZE_CHANGED, EVENT_TIMELINE_CHANGED, EVENT_TRACK_SELECTION_PARAMETERS_CHANGED, EVENT_TRACKS_CHANGED, EVENT_UPSTREAM_DISCARDED, EVENT_VIDEO_CODEC_ERROR, EVENT_VIDEO_DECODER_INITIALIZED, EVENT_VIDEO_DECODER_RELEASED, EVENT_VIDEO_DISABLED, EVENT_VIDEO_ENABLED, EVENT_VIDEO_FRAME_PROCESSING_OFFSET, EVENT_VIDEO_INPUT_FORMAT_CHANGED, EVENT_VIDEO_SIZE_CHANGED, EVENT_VOLUME_CHANGED`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EventLogger()` | Creates an instance.
    `EventLogger​(MappingTrackSelector trackSelector)` | Deprecated. Use `EventLogger()`
    `EventLogger​(MappingTrackSelector trackSelector, String tag)` | Deprecated. Use `EventLogger(java.lang.String)`
    `EventLogger​(String tag)` | Creates an instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `logd​(String msg)` | Logs a debug message.
    `protected void` | `loge​(String msg)` | Logs an error message.
    `void` | `onAudioAttributesChanged​(AnalyticsListener.EventTime eventTime, AudioAttributes audioAttributes)` | Called when the audio attributes change.
    `void` | `onAudioDecoderInitialized​(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)` |
    `void` | `onAudioDecoderReleased​(AnalyticsListener.EventTime eventTime, String decoderName)` | Called when an audio renderer releases a decoder.
    `void` | `onAudioDisabled​(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)` | Called when an audio renderer is disabled.
    `void` | `onAudioEnabled​(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)` | Called when an audio renderer is enabled.
    `void` | `onAudioInputFormatChanged​(AnalyticsListener.EventTime eventTime, Format format, DecoderReuseEvaluation decoderReuseEvaluation)` | Called when the format of the media being consumed by an audio renderer changes.
    `void` | `onAudioSessionIdChanged​(AnalyticsListener.EventTime eventTime, int audioSessionId)` | Called when the audio session ID changes.
    `void` | `onAudioUnderrun​(AnalyticsListener.EventTime eventTime, int bufferSize, long bufferSizeMs, long elapsedSinceLastFeedMs)` | Called when an audio underrun occurs.
    `void` | `onBandwidthEstimate​(AnalyticsListener.EventTime eventTime, int totalLoadTimeMs, long totalBytesLoaded, long bitrateEstimate)` | Called when the bandwidth estimate for the current data source has been updated.
    `void` | `onDownstreamFormatChanged​(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)` | Called when the downstream format sent to the renderers changed.
    `void` | `onDrmKeysLoaded​(AnalyticsListener.EventTime eventTime)` | Called each time drm keys are loaded.
    `void` | `onDrmKeysRemoved​(AnalyticsListener.EventTime eventTime)` | Called each time offline drm keys are removed.
    `void` | `onDrmKeysRestored​(AnalyticsListener.EventTime eventTime)` | Called each time offline drm keys are restored.
    `void` | `onDrmSessionAcquired​(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.drm.DrmSession.State int state)` | Called each time a drm session is acquired.
    `void` | `onDrmSessionManagerError​(AnalyticsListener.EventTime eventTime, Exception error)` | Called when a drm error occurs.
    `void` | `onDrmSessionReleased​(AnalyticsListener.EventTime eventTime)` | Called each time a drm session is released.
    `void` | `onDroppedVideoFrames​(AnalyticsListener.EventTime eventTime, int droppedFrames, long elapsedMs)` | Called after video frames have been dropped.
    `void` | `onIsLoadingChanged​(AnalyticsListener.EventTime eventTime, boolean isLoading)` | Called when the player starts or stops loading data from a source.
    `void` | `onIsPlayingChanged​(AnalyticsListener.EventTime eventTime, boolean isPlaying)` | Called when the player starts or stops playing.
    `void` | `onLoadCanceled​(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)` | Called when a media source canceled loading data.
    `void` | `onLoadCompleted​(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)` | Called when a media source completed loading data.
    `void` | `onLoadError​(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData, IOException error, boolean wasCanceled)` | Called when a media source loading error occurred.
    `void` | `onLoadStarted​(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)` | Called when a media source started loading data.
    `void` | `onMediaItemTransition​(AnalyticsListener.EventTime eventTime, MediaItem mediaItem, int reason)` | Called when playback transitions to a different media item.
    `void` | `onMetadata​(AnalyticsListener.EventTime eventTime, Metadata metadata)` | Called when there is `Metadata` associated with the current playback time.
    `void` | `onPlaybackParametersChanged​(AnalyticsListener.EventTime eventTime, PlaybackParameters playbackParameters)` | Called when the playback parameters changed.
    `void` | `onPlaybackStateChanged​(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.State int state)` | Called when the playback state changed.
    `void` | `onPlaybackSuppressionReasonChanged​(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)` | Called when playback suppression reason changed.
    `void` | `onPlayerError​(AnalyticsListener.EventTime eventTime, PlaybackException error)` | Called when a fatal player error occurred.
    `void` | `onPlayWhenReadyChanged​(AnalyticsListener.EventTime eventTime, boolean playWhenReady, @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)` | Called when the value changed that indicates whether playback will proceed when ready.
    `void` | `onPositionDiscontinuity​(AnalyticsListener.EventTime eventTime, Player.PositionInfo oldPosition, Player.PositionInfo newPosition, @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)` | Called when a position discontinuity occurred.
    `void` | `onRenderedFirstFrame​(AnalyticsListener.EventTime eventTime, Object output, long renderTimeMs)` | 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.
    `void` | `onRepeatModeChanged​(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)` | Called when the repeat mode changed.
    `void` | `onShuffleModeChanged​(AnalyticsListener.EventTime eventTime, boolean shuffleModeEnabled)` | Called when the shuffle mode changed.
    `void` | `onSkipSilenceEnabledChanged​(AnalyticsListener.EventTime eventTime, boolean skipSilenceEnabled)` | Called when skipping silences is enabled or disabled in the audio stream.
    `void` | `onSurfaceSizeChanged​(AnalyticsListener.EventTime eventTime, int width, int height)` | Called when the output surface size changed.
    `void` | `onTimelineChanged​(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)` | Called when the timeline changed.
    `void` | `onTracksChanged​(AnalyticsListener.EventTime eventTime, Tracks tracks)` | Called when the tracks change.
    `void` | `onUpstreamDiscarded​(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)` | Called when data is removed from the back of a media buffer, typically so that it can be re-buffered in a different format.
    `void` | `onVideoDecoderInitialized​(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)` |
    `void` | `onVideoDecoderReleased​(AnalyticsListener.EventTime eventTime, String decoderName)` | Called when a video renderer releases a decoder.
    `void` | `onVideoDisabled​(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)` | Called when a video renderer is disabled.
    `void` | `onVideoEnabled​(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)` | Called when a video renderer is enabled.
    `void` | `onVideoInputFormatChanged​(AnalyticsListener.EventTime eventTime, Format format, DecoderReuseEvaluation decoderReuseEvaluation)` | Called when the format of the media being consumed by a video renderer changes.
    `void` | `onVideoSizeChanged​(AnalyticsListener.EventTime eventTime, VideoSize videoSize)` | 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.
    `void` | `onVolumeChanged​(AnalyticsListener.EventTime eventTime, float volume)` | Called when the volume changes.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.google.android.exoplayer2.analytics.AnalyticsListener

      `onAudioCodecError, onAudioDecoderInitialized, onAudioInputFormatChanged, onAudioPositionAdvancing, onAudioSinkError, onAvailableCommandsChanged, onCues, onCues, onDecoderDisabled, onDecoderEnabled, onDecoderInitialized, onDecoderInputFormatChanged, onDeviceInfoChanged, onDeviceVolumeChanged, onDrmSessionAcquired, onEvents, onLoadingChanged, onMaxSeekToPreviousPositionChanged, onMediaMetadataChanged, onPlayerErrorChanged, onPlayerReleased, onPlayerStateChanged, onPlaylistMetadataChanged, onPositionDiscontinuity, onSeekBackIncrementChanged, onSeekForwardIncrementChanged, onSeekProcessed, onSeekStarted, onTrackSelectionParametersChanged, onVideoCodecError, onVideoDecoderInitialized, onVideoFrameProcessingOffset, onVideoInputFormatChanged, onVideoSizeChanged`

- - ### Constructor Detail

    - #### EventLogger

          public EventLogger()

      Creates an instance.

    - #### EventLogger

          public EventLogger​(String tag)

      Creates an instance.
      Parameters:
        `tag` - The tag used for logging.

    - #### EventLogger

          @Deprecated
          public EventLogger​(@Nullable
                             MappingTrackSelector trackSelector)

      Deprecated.
      Use `EventLogger()`
      Creates an instance.
      Parameters:
        `trackSelector` - This parameter is ignored.

    - #### EventLogger

          @Deprecated
          public EventLogger​(@Nullable
                             MappingTrackSelector trackSelector,
                             String tag)

      Deprecated.
      Use `EventLogger(java.lang.String)`
      Creates an instance.
      Parameters:
        `trackSelector` - This parameter is ignored.
        `tag` - The tag used for logging.

  - ### Method Detail

    - #### onIsLoadingChanged

          public void onIsLoadingChanged​(AnalyticsListener.EventTime eventTime,
                                         boolean isLoading)

      Description copied from interface: `AnalyticsListener`
      Called when the player starts or stops loading data from a source.
      Specified by:
        `onIsLoadingChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `isLoading` - Whether the player is loading.

    - #### onPlaybackStateChanged

          public void onPlaybackStateChanged​(AnalyticsListener.EventTime eventTime,
                                             @State
                                             @com.google.android.exoplayer2.Player.State int state)

      Description copied from interface: `AnalyticsListener`
      Called when the playback state changed.
      Specified by:
        `onPlaybackStateChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `state` - The new `playback state`.

    - #### onPlayWhenReadyChanged

          public void onPlayWhenReadyChanged​(AnalyticsListener.EventTime eventTime,
                                             boolean playWhenReady,
                                             @PlayWhenReadyChangeReason
                                             @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)

      Description copied from interface: `AnalyticsListener`
      Called when the value changed that indicates whether playback will proceed when ready.
      Specified by:
        `onPlayWhenReadyChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `playWhenReady` - Whether playback will proceed when ready.
        `reason` - The `reason` of the change.

    - #### onPlaybackSuppressionReasonChanged

          public void onPlaybackSuppressionReasonChanged​(AnalyticsListener.EventTime eventTime,
                                                         @PlaybackSuppressionReason
                                                         @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)

      Description copied from interface: `AnalyticsListener`
      Called when playback suppression reason changed.
      Specified by:
        `onPlaybackSuppressionReasonChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `playbackSuppressionReason` - The new `Player.PlaybackSuppressionReason`.

    - #### onIsPlayingChanged

          public void onIsPlayingChanged​(AnalyticsListener.EventTime eventTime,
                                         boolean isPlaying)

      Description copied from interface: `AnalyticsListener`
      Called when the player starts or stops playing.
      Specified by:
        `onIsPlayingChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `isPlaying` - Whether the player is playing.

    - #### onRepeatModeChanged

          public void onRepeatModeChanged​(AnalyticsListener.EventTime eventTime,
                                          @RepeatMode
                                          @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)

      Description copied from interface: `AnalyticsListener`
      Called when the repeat mode changed.
      Specified by:
        `onRepeatModeChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `repeatMode` - The new repeat mode.

    - #### onShuffleModeChanged

          public void onShuffleModeChanged​(AnalyticsListener.EventTime eventTime,
                                           boolean shuffleModeEnabled)

      Description copied from interface: `AnalyticsListener`
      Called when the shuffle mode changed.
      Specified by:
        `onShuffleModeChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `shuffleModeEnabled` - Whether the shuffle mode is enabled.

    - #### onPositionDiscontinuity

          public void onPositionDiscontinuity​(AnalyticsListener.EventTime eventTime,
                                              Player.PositionInfo oldPosition,
                                              Player.PositionInfo newPosition,
                                              @DiscontinuityReason
                                              @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)

      Description copied from interface: `AnalyticsListener`
      Called when a position discontinuity occurred.
      Specified by:
        `onPositionDiscontinuity` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `oldPosition` - The position before the discontinuity.
        `newPosition` - The position after the discontinuity.
        `reason` - The reason for the position discontinuity.

    - #### onPlaybackParametersChanged

          public void onPlaybackParametersChanged​(AnalyticsListener.EventTime eventTime,
                                                  PlaybackParameters playbackParameters)

      Description copied from interface: `AnalyticsListener`
      Called when the playback parameters changed.
      Specified by:
        `onPlaybackParametersChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `playbackParameters` - The new playback parameters.

    - #### onTimelineChanged

          public void onTimelineChanged​(AnalyticsListener.EventTime eventTime,
                                        @TimelineChangeReason
                                        @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)

      Description copied from interface: `AnalyticsListener`
      Called when the timeline changed.
      Specified by:
        `onTimelineChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `reason` - The reason for the timeline change.

    - #### onMediaItemTransition

          public void onMediaItemTransition​(AnalyticsListener.EventTime eventTime,
                                            @Nullable
                                            MediaItem mediaItem,
                                            int reason)

      Description copied from interface: `AnalyticsListener`
      Called when playback transitions to a different media item.
      Specified by:
        `onMediaItemTransition` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `mediaItem` - The media item.
        `reason` - The reason for the media item transition.

    - #### onPlayerError

          public void onPlayerError​(AnalyticsListener.EventTime eventTime,
                                    PlaybackException error)

      Description copied from interface: `AnalyticsListener`
      Called when a fatal player error occurred.

      Implementations of `Player` may pass an instance of a subclass of `PlaybackException` to this method in order to include more information about the error.

      Specified by:
        `onPlayerError` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `error` - The error.

    - #### onTracksChanged

          public void onTracksChanged​(AnalyticsListener.EventTime eventTime,
                                      Tracks tracks)

      Description copied from interface: `AnalyticsListener`
      Called when the tracks change.
      Specified by:
        `onTracksChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `tracks` - The tracks. Never null, but may be of length zero.

    - #### onMetadata

          public void onMetadata​(AnalyticsListener.EventTime eventTime,
                                 Metadata metadata)

      Description copied from interface: `AnalyticsListener`
      Called when there is `Metadata` associated with the current playback time.
      Specified by:
        `onMetadata` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `metadata` - The metadata.

    - #### onAudioEnabled

          public void onAudioEnabled​(AnalyticsListener.EventTime eventTime,
                                     DecoderCounters decoderCounters)

      Description copied from interface: `AnalyticsListener`
      Called when an audio renderer is enabled.
      Specified by:
        `onAudioEnabled` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `decoderCounters` - `DecoderCounters` that will be updated by the renderer for as long as it remains enabled.

    - #### onAudioDecoderInitialized

          public void onAudioDecoderInitialized​(AnalyticsListener.EventTime eventTime,
                                                String decoderName,
                                                long initializationDurationMs)

      Specified by:
        `onAudioDecoderInitialized` in interface `AnalyticsListener`

    - #### onAudioInputFormatChanged

          public void onAudioInputFormatChanged​(AnalyticsListener.EventTime eventTime,
                                                Format format,
                                                @Nullable
                                                DecoderReuseEvaluation decoderReuseEvaluation)

      Description copied from interface: `AnalyticsListener`
      Called when the format of the media being consumed by an audio renderer changes.
      Specified by:
        `onAudioInputFormatChanged` in interface `AnalyticsListener`
      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, or `null` if the renderer did not have a decoder.

    - #### onAudioUnderrun

          public void onAudioUnderrun​(AnalyticsListener.EventTime eventTime,
                                      int bufferSize,
                                      long bufferSizeMs,
                                      long elapsedSinceLastFeedMs)

      Description copied from interface: `AnalyticsListener`
      Called when an audio underrun occurs.
      Specified by:
        `onAudioUnderrun` in interface `AnalyticsListener`
      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

          public void onAudioDecoderReleased​(AnalyticsListener.EventTime eventTime,
                                             String decoderName)

      Description copied from interface: `AnalyticsListener`
      Called when an audio renderer releases a decoder.
      Specified by:
        `onAudioDecoderReleased` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `decoderName` - The decoder that was released.

    - #### onAudioDisabled

          public void onAudioDisabled​(AnalyticsListener.EventTime eventTime,
                                      DecoderCounters decoderCounters)

      Description copied from interface: `AnalyticsListener`
      Called when an audio renderer is disabled.
      Specified by:
        `onAudioDisabled` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `decoderCounters` - `DecoderCounters` that were updated by the renderer.

    - #### onAudioSessionIdChanged

          public void onAudioSessionIdChanged​(AnalyticsListener.EventTime eventTime,
                                              int audioSessionId)

      Description copied from interface: `AnalyticsListener`
      Called when the audio session ID changes.
      Specified by:
        `onAudioSessionIdChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `audioSessionId` - The audio session ID.

    - #### onAudioAttributesChanged

          public void onAudioAttributesChanged​(AnalyticsListener.EventTime eventTime,
                                               AudioAttributes audioAttributes)

      Description copied from interface: `AnalyticsListener`
      Called when the audio attributes change.
      Specified by:
        `onAudioAttributesChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `audioAttributes` - The audio attributes.

    - #### onSkipSilenceEnabledChanged

          public void onSkipSilenceEnabledChanged​(AnalyticsListener.EventTime eventTime,
                                                  boolean skipSilenceEnabled)

      Description copied from interface: `AnalyticsListener`
      Called when skipping silences is enabled or disabled in the audio stream.
      Specified by:
        `onSkipSilenceEnabledChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `skipSilenceEnabled` - Whether skipping silences in the audio stream is enabled.

    - #### onVolumeChanged

          public void onVolumeChanged​(AnalyticsListener.EventTime eventTime,
                                      float volume)

      Description copied from interface: `AnalyticsListener`
      Called when the volume changes.
      Specified by:
        `onVolumeChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `volume` - The new volume, with 0 being silence and 1 being unity gain.

    - #### onVideoEnabled

          public void onVideoEnabled​(AnalyticsListener.EventTime eventTime,
                                     DecoderCounters decoderCounters)

      Description copied from interface: `AnalyticsListener`
      Called when a video renderer is enabled.
      Specified by:
        `onVideoEnabled` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `decoderCounters` - `DecoderCounters` that will be updated by the renderer for as long as it remains enabled.

    - #### onVideoDecoderInitialized

          public void onVideoDecoderInitialized​(AnalyticsListener.EventTime eventTime,
                                                String decoderName,
                                                long initializationDurationMs)

      Specified by:
        `onVideoDecoderInitialized` in interface `AnalyticsListener`

    - #### onVideoInputFormatChanged

          public void onVideoInputFormatChanged​(AnalyticsListener.EventTime eventTime,
                                                Format format,
                                                @Nullable
                                                DecoderReuseEvaluation decoderReuseEvaluation)

      Description copied from interface: `AnalyticsListener`
      Called when the format of the media being consumed by a video renderer changes.
      Specified by:
        `onVideoInputFormatChanged` in interface `AnalyticsListener`
      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, or `null` if the renderer did not have a decoder.

    - #### onDroppedVideoFrames

          public void onDroppedVideoFrames​(AnalyticsListener.EventTime eventTime,
                                           int droppedFrames,
                                           long elapsedMs)

      Description copied from interface: `AnalyticsListener`
      Called after video frames have been dropped.
      Specified by:
        `onDroppedVideoFrames` in interface `AnalyticsListener`
      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

          public void onVideoDecoderReleased​(AnalyticsListener.EventTime eventTime,
                                             String decoderName)

      Description copied from interface: `AnalyticsListener`
      Called when a video renderer releases a decoder.
      Specified by:
        `onVideoDecoderReleased` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `decoderName` - The decoder that was released.

    - #### onVideoDisabled

          public void onVideoDisabled​(AnalyticsListener.EventTime eventTime,
                                      DecoderCounters decoderCounters)

      Description copied from interface: `AnalyticsListener`
      Called when a video renderer is disabled.
      Specified by:
        `onVideoDisabled` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `decoderCounters` - `DecoderCounters` that were updated by the renderer.

    - #### onRenderedFirstFrame

          public void onRenderedFirstFrame​(AnalyticsListener.EventTime eventTime,
                                           Object output,
                                           long renderTimeMs)

      Description copied from interface: `AnalyticsListener`
      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.
      Specified by:
        `onRenderedFirstFrame` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `output` - The output to which a frame has been rendered. Normally a `Surface`, however may also be other output types (e.g., a `VideoDecoderOutputBufferRenderer`).
        `renderTimeMs` - `SystemClock.elapsedRealtime()` when the first frame was rendered.

    - #### onVideoSizeChanged

          public void onVideoSizeChanged​(AnalyticsListener.EventTime eventTime,
                                         VideoSize videoSize)

      Description copied from interface: `AnalyticsListener`
      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.
      Specified by:
        `onVideoSizeChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `videoSize` - The new size of the video.

    - #### onLoadStarted

          public void onLoadStarted​(AnalyticsListener.EventTime eventTime,
                                    LoadEventInfo loadEventInfo,
                                    MediaLoadData mediaLoadData)

      Description copied from interface: `AnalyticsListener`
      Called when a media source started loading data.
      Specified by:
        `onLoadStarted` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `loadEventInfo` - The `LoadEventInfo` defining the load event.
        `mediaLoadData` - The `MediaLoadData` defining the data being loaded.

    - #### onLoadError

          public void onLoadError​(AnalyticsListener.EventTime eventTime,
                                  LoadEventInfo loadEventInfo,
                                  MediaLoadData mediaLoadData,
                                  IOException error,
                                  boolean wasCanceled)

      Description copied from interface: `AnalyticsListener`
      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.

      Specified by:
        `onLoadError` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `loadEventInfo` - The `LoadEventInfo` defining the load event.
        `mediaLoadData` - The `MediaLoadData` defining the data being loaded.
        `error` - The load error.
        `wasCanceled` - Whether the load was canceled as a result of the error.

    - #### onLoadCanceled

          public void onLoadCanceled​(AnalyticsListener.EventTime eventTime,
                                     LoadEventInfo loadEventInfo,
                                     MediaLoadData mediaLoadData)

      Description copied from interface: `AnalyticsListener`
      Called when a media source canceled loading data.
      Specified by:
        `onLoadCanceled` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `loadEventInfo` - The `LoadEventInfo` defining the load event.
        `mediaLoadData` - The `MediaLoadData` defining the data being loaded.

    - #### onLoadCompleted

          public void onLoadCompleted​(AnalyticsListener.EventTime eventTime,
                                      LoadEventInfo loadEventInfo,
                                      MediaLoadData mediaLoadData)

      Description copied from interface: `AnalyticsListener`
      Called when a media source completed loading data.
      Specified by:
        `onLoadCompleted` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `loadEventInfo` - The `LoadEventInfo` defining the load event.
        `mediaLoadData` - The `MediaLoadData` defining the data being loaded.

    - #### onBandwidthEstimate

          public void onBandwidthEstimate​(AnalyticsListener.EventTime eventTime,
                                          int totalLoadTimeMs,
                                          long totalBytesLoaded,
                                          long bitrateEstimate)

      Description copied from interface: `AnalyticsListener`
      Called when the bandwidth estimate for the current data source has been updated.
      Specified by:
        `onBandwidthEstimate` in interface `AnalyticsListener`
      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.

    - #### onSurfaceSizeChanged

          public void onSurfaceSizeChanged​(AnalyticsListener.EventTime eventTime,
                                           int width,
                                           int height)

      Description copied from interface: `AnalyticsListener`
      Called when the output surface size changed.
      Specified by:
        `onSurfaceSizeChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `width` - The surface width in pixels. May be `C.LENGTH_UNSET` if unknown, or 0 if the video is not rendered onto a surface.
        `height` - The surface height in pixels. May be `C.LENGTH_UNSET` if unknown, or 0 if the video is not rendered onto a surface.

    - #### onUpstreamDiscarded

          public void onUpstreamDiscarded​(AnalyticsListener.EventTime eventTime,
                                          MediaLoadData mediaLoadData)

      Description copied from interface: `AnalyticsListener`
      Called when data is removed from the back of a media buffer, typically so that it can be re-buffered in a different format.
      Specified by:
        `onUpstreamDiscarded` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `mediaLoadData` - The `MediaLoadData` defining the media being discarded.

    - #### onDownstreamFormatChanged

          public void onDownstreamFormatChanged​(AnalyticsListener.EventTime eventTime,
                                                MediaLoadData mediaLoadData)

      Description copied from interface: `AnalyticsListener`
      Called when the downstream format sent to the renderers changed.
      Specified by:
        `onDownstreamFormatChanged` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `mediaLoadData` - The `MediaLoadData` defining the newly selected media data.

    - #### onDrmSessionAcquired

          public void onDrmSessionAcquired​(AnalyticsListener.EventTime eventTime,
                                           @State
                                           @com.google.android.exoplayer2.drm.DrmSession.State int state)

      Description copied from interface: `AnalyticsListener`
      Called each time a drm session is acquired.
      Specified by:
        `onDrmSessionAcquired` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `state` - The `DrmSession.State` of the session when the acquisition completed.

    - #### onDrmSessionManagerError

          public void onDrmSessionManagerError​(AnalyticsListener.EventTime eventTime,
                                               Exception error)

      Description copied from interface: `AnalyticsListener`
      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.

      Specified by:
        `onDrmSessionManagerError` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.
        `error` - The error.

    - #### onDrmKeysRestored

          public void onDrmKeysRestored​(AnalyticsListener.EventTime eventTime)

      Description copied from interface: `AnalyticsListener`
      Called each time offline drm keys are restored.
      Specified by:
        `onDrmKeysRestored` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.

    - #### onDrmKeysRemoved

          public void onDrmKeysRemoved​(AnalyticsListener.EventTime eventTime)

      Description copied from interface: `AnalyticsListener`
      Called each time offline drm keys are removed.
      Specified by:
        `onDrmKeysRemoved` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.

    - #### onDrmKeysLoaded

          public void onDrmKeysLoaded​(AnalyticsListener.EventTime eventTime)

      Description copied from interface: `AnalyticsListener`
      Called each time drm keys are loaded.
      Specified by:
        `onDrmKeysLoaded` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.

    - #### onDrmSessionReleased

          public void onDrmSessionReleased​(AnalyticsListener.EventTime eventTime)

      Description copied from interface: `AnalyticsListener`
      Called each time a drm session is released.
      Specified by:
        `onDrmSessionReleased` in interface `AnalyticsListener`
      Parameters:
        `eventTime` - The event time.

    - #### logd

          protected void logd​(String msg)

      Logs a debug message.
      Parameters:
        `msg` - The message to log.

    - #### loge

          protected void loge​(String msg)

      Logs an error message.
      Parameters:
        `msg` - The message to log.