public class AnalyticsCollector extends java.lang.Object implements Player.EventListener, MetadataOutput, AudioRendererEventListener, VideoRendererEventListener, MediaSourceEventListener, BandwidthMeter.EventListener, DefaultDrmSessionEventListener, VideoListener, AudioListener
AnalyticsListeners by
listening to all available ExoPlayer listeners.| Modifier and Type | Class and Description |
|---|---|
static class |
AnalyticsCollector.Factory
Factory for an analytics collector.
|
AudioRendererEventListener.EventDispatcherVideoRendererEventListener.EventDispatcherMediaSourceEventListener.EventDispatcher, MediaSourceEventListener.LoadEventInfo, MediaSourceEventListener.MediaLoadData| Modifier | Constructor and Description |
|---|---|
protected |
AnalyticsCollector(Player player,
Clock clock)
Creates an analytics collector for the specified player.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(AnalyticsListener listener)
Adds a listener for analytics events.
|
protected AnalyticsListener.EventTime |
generateEventTime(Timeline timeline,
int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId)
Returns a new
AnalyticsListener.EventTime for the specified timeline, window and media period id. |
protected java.util.Set<AnalyticsListener> |
getListeners()
Returns read-only set of registered listeners.
|
void |
notifySeekStarted()
Notify analytics collector that a seek operation will start.
|
void |
onAudioAttributesChanged(AudioAttributes audioAttributes)
Called when the audio attributes change.
|
void |
onAudioDecoderInitialized(java.lang.String decoderName,
long initializedTimestampMs,
long initializationDurationMs)
Called when a decoder is created.
|
void |
onAudioDisabled(DecoderCounters counters)
Called when the renderer is disabled.
|
void |
onAudioEnabled(DecoderCounters counters)
Called when the renderer is enabled.
|
void |
onAudioInputFormatChanged(Format format)
Called when the format of the media being consumed by the renderer changes.
|
void |
onAudioSessionId(int audioSessionId)
Called when the audio session is set.
|
void |
onAudioSinkUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
Called when an
AudioSink underrun occurs. |
void |
onBandwidthSample(int elapsedMs,
long bytes,
long bitrate)
Called periodically to indicate that bytes have been transferred.
|
void |
onDownstreamFormatChanged(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.MediaLoadData mediaLoadData)
Called when a downstream format change occurs (i.e.
|
void |
onDrmKeysLoaded()
Called each time keys are loaded.
|
void |
onDrmKeysRemoved()
Called each time offline keys are removed.
|
void |
onDrmKeysRestored()
Called each time offline keys are restored.
|
void |
onDrmSessionAcquired()
Called each time a drm session is acquired.
|
void |
onDrmSessionManagerError(java.lang.Exception error)
Called when a drm error occurs.
|
void |
onDrmSessionReleased()
Called each time a drm session is released.
|
void |
onDroppedFrames(int count,
long elapsedMs)
Called to report the number of frames dropped by the renderer.
|
void |
onLoadCanceled(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData)
Called when a load is canceled.
|
void |
onLoadCompleted(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData)
Called when a load ends.
|
void |
onLoadError(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData,
java.io.IOException error,
boolean wasCanceled)
Called when a load error occurs.
|
void |
onLoadingChanged(boolean isLoading)
Called when the player starts or stops loading the source.
|
void |
onLoadStarted(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData)
Called when a load begins.
|
void |
onMediaPeriodCreated(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId)
Called when a media period is created by the media source.
|
void |
onMediaPeriodReleased(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId)
Called when a media period is released by the media source.
|
void |
onMetadata(Metadata metadata)
Called when there is metadata associated with current playback time.
|
void |
onPlaybackParametersChanged(PlaybackParameters playbackParameters)
Called when the current playback parameters change.
|
void |
onPlayerError(ExoPlaybackException error)
Called when an error occurs.
|
void |
onPlayerStateChanged(boolean playWhenReady,
int playbackState)
Called when the value returned from either
Player.getPlayWhenReady() or Player.getPlaybackState() changes. |
void |
onPositionDiscontinuity(int reason)
Called when a position discontinuity occurs without a change to the timeline.
|
void |
onReadingStarted(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId)
Called when a media period is first being read from.
|
void |
onRenderedFirstFrame()
Called when a frame is rendered for the first time since setting the surface, and when a frame
is rendered for the first time since a video track was selected.
|
void |
onRenderedFirstFrame(android.view.Surface surface)
Called when a frame is rendered for the first time since setting the surface, and when a frame
is rendered for the first time since the renderer was reset.
|
void |
onRepeatModeChanged(int repeatMode)
Called when the value of
Player.getRepeatMode() changes. |
void |
onSeekProcessed()
Called when all pending seek requests have been processed by the player.
|
void |
onShuffleModeEnabledChanged(boolean shuffleModeEnabled)
Called when the value of
Player.getShuffleModeEnabled() changes. |
void |
onSurfaceSizeChanged(int width,
int height)
Called each time there's a change in the size of the surface onto which the video is being
rendered.
|
void |
onTimelineChanged(Timeline timeline,
java.lang.Object manifest,
int reason)
Called when the timeline and/or manifest has been refreshed.
|
void |
onTracksChanged(TrackGroupArray trackGroups,
TrackSelectionArray trackSelections)
Called when the available or selected tracks change.
|
void |
onUpstreamDiscarded(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.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(java.lang.String decoderName,
long initializedTimestampMs,
long initializationDurationMs)
Called when a decoder is created.
|
void |
onVideoDisabled(DecoderCounters counters)
Called when the renderer is disabled.
|
void |
onVideoEnabled(DecoderCounters counters)
Called when the renderer is enabled.
|
void |
onVideoInputFormatChanged(Format format)
Called when the format of the media being consumed by the renderer changes.
|
void |
onVideoSizeChanged(int width,
int height,
int unappliedRotationDegrees,
float pixelWidthHeightRatio)
Called before a frame is rendered for the first time since setting the surface, and each time
there's a change in the size, rotation or pixel aspect ratio of the video being rendered.
|
void |
onVolumeChanged(float audioVolume)
Called when the volume changes.
|
void |
removeListener(AnalyticsListener listener)
Removes a previously added analytics event listener.
|
void |
resetForNewMediaSource()
Resets the analytics collector for a new media source.
|
void |
setPlayer(Player player)
Sets the player for which data will be collected.
|
protected AnalyticsCollector(@Nullable
Player player,
Clock clock)
player - The Player for which data will be collected. Can be null, if the player
is set by calling setPlayer(Player) before using the analytics
collector.clock - A Clock used to generate timestamps.public void addListener(AnalyticsListener listener)
listener - The listener to add.public void removeListener(AnalyticsListener listener)
listener - The listener to remove.public void setPlayer(Player player)
player - The Player for which data will be collected.public final void notifySeekStarted()
public final void resetForNewMediaSource()
public final void onMetadata(Metadata metadata)
MetadataOutputonMetadata in interface MetadataOutputmetadata - The metadata.public final void onAudioEnabled(DecoderCounters counters)
AudioRendererEventListeneronAudioEnabled in interface AudioRendererEventListenercounters - DecoderCounters that will be updated by the renderer for as long as it
remains enabled.public final void onAudioDecoderInitialized(java.lang.String decoderName,
long initializedTimestampMs,
long initializationDurationMs)
AudioRendererEventListeneronAudioDecoderInitialized in interface AudioRendererEventListenerdecoderName - The decoder that was created.initializedTimestampMs - SystemClock.elapsedRealtime() when initialization
finished.initializationDurationMs - The time taken to initialize the decoder in milliseconds.public final void onAudioInputFormatChanged(Format format)
AudioRendererEventListeneronAudioInputFormatChanged in interface AudioRendererEventListenerformat - The new format.public final void onAudioSinkUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
AudioRendererEventListenerAudioSink underrun occurs.onAudioSinkUnderrun in interface AudioRendererEventListenerbufferSize - The size of the AudioSink's buffer, in bytes.bufferSizeMs - The size of the AudioSink's buffer, in milliseconds, if it is
configured for PCM output. C.TIME_UNSET if it is configured for passthrough output,
as the buffered media can have a variable bitrate so the duration may be unknown.elapsedSinceLastFeedMs - The time since the AudioSink was last fed data.public final void onAudioDisabled(DecoderCounters counters)
AudioRendererEventListeneronAudioDisabled in interface AudioRendererEventListenercounters - DecoderCounters that were updated by the renderer.public final void onAudioSessionId(int audioSessionId)
AudioRendererEventListeneronAudioSessionId in interface AudioListeneronAudioSessionId in interface AudioRendererEventListeneraudioSessionId - The audio session id.public void onAudioAttributesChanged(AudioAttributes audioAttributes)
AudioListeneronAudioAttributesChanged in interface AudioListeneraudioAttributes - The audio attributes.public void onVolumeChanged(float audioVolume)
AudioListeneronVolumeChanged in interface AudioListeneraudioVolume - The new volume, with 0 being silence and 1 being unity gain.public final void onVideoEnabled(DecoderCounters counters)
VideoRendererEventListeneronVideoEnabled in interface VideoRendererEventListenercounters - DecoderCounters that will be updated by the renderer for as long as it
remains enabled.public final void onVideoDecoderInitialized(java.lang.String decoderName,
long initializedTimestampMs,
long initializationDurationMs)
VideoRendererEventListeneronVideoDecoderInitialized in interface VideoRendererEventListenerdecoderName - The decoder that was created.initializedTimestampMs - SystemClock.elapsedRealtime() when initialization
finished.initializationDurationMs - The time taken to initialize the decoder in milliseconds.public final void onVideoInputFormatChanged(Format format)
VideoRendererEventListeneronVideoInputFormatChanged in interface VideoRendererEventListenerformat - The new format.public final void onDroppedFrames(int count,
long elapsedMs)
VideoRendererEventListeneronDroppedFrames in interface VideoRendererEventListenercount - The number of dropped frames.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.public final void onVideoDisabled(DecoderCounters counters)
VideoRendererEventListeneronVideoDisabled in interface VideoRendererEventListenercounters - DecoderCounters that were updated by the renderer.public final void onRenderedFirstFrame(@Nullable
android.view.Surface surface)
VideoRendererEventListeneronRenderedFirstFrame in interface VideoRendererEventListenersurface - The Surface to which a first frame has been rendered, or null if
the renderer renders to something that isn't a Surface.public final void onRenderedFirstFrame()
VideoListeneronRenderedFirstFrame in interface VideoListenerpublic final void onVideoSizeChanged(int width,
int height,
int unappliedRotationDegrees,
float pixelWidthHeightRatio)
VideoRendererEventListeneronVideoSizeChanged in interface VideoListeneronVideoSizeChanged in interface VideoRendererEventListenerwidth - The video width in pixels.height - The video height in pixels.unappliedRotationDegrees - For videos that require a rotation, this is the clockwise
rotation in degrees that the application should apply for the video for it to be rendered
in the correct orientation. This value will always be zero on API levels 21 and above,
since the renderer will apply all necessary rotations internally. On earlier API levels
this is not possible. Applications that use TextureView can apply the rotation by
calling TextureView.setTransform(android.graphics.Matrix). Applications that do not expect to encounter
rotated videos can safely ignore this parameter.pixelWidthHeightRatio - The width to height ratio of each pixel. For the normal case
of square pixels this will be equal to 1.0. Different values are indicative of anamorphic
content.public void onSurfaceSizeChanged(int width,
int height)
VideoListeneronSurfaceSizeChanged in interface VideoListenerwidth - 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.public final void onMediaPeriodCreated(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId)
MediaSourceEventListeneronMediaPeriodCreated in interface MediaSourceEventListenerwindowIndex - The window index in the timeline this media period belongs to.mediaPeriodId - The MediaSource.MediaPeriodId of the created media period.public final void onMediaPeriodReleased(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId)
MediaSourceEventListeneronMediaPeriodReleased in interface MediaSourceEventListenerwindowIndex - The window index in the timeline this media period belongs to.mediaPeriodId - The MediaSource.MediaPeriodId of the released media period.public final void onLoadStarted(int windowIndex,
@Nullable
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData)
MediaSourceEventListeneronLoadStarted in interface MediaSourceEventListenerwindowIndex - The window index in the timeline of the media source this load belongs to.mediaPeriodId - The MediaSource.MediaPeriodId this load belongs to. Null if the load does not
belong to a specific media period.loadEventInfo - The MediaSourceEventListener.LoadEventInfo corresponding to the event. The value of MediaSourceEventListener.LoadEventInfo.uri won't reflect potential redirection yet and MediaSourceEventListener.LoadEventInfo.responseHeaders will be empty.mediaLoadData - The MediaSourceEventListener.MediaLoadData defining the data being loaded.public final void onLoadCompleted(int windowIndex,
@Nullable
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData)
MediaSourceEventListeneronLoadCompleted in interface MediaSourceEventListenerwindowIndex - The window index in the timeline of the media source this load belongs to.mediaPeriodId - The MediaSource.MediaPeriodId this load belongs to. Null if the load does not
belong to a specific media period.loadEventInfo - The MediaSourceEventListener.LoadEventInfo corresponding to the event. The values of MediaSourceEventListener.LoadEventInfo.elapsedRealtimeMs and MediaSourceEventListener.LoadEventInfo.bytesLoaded are relative to the
corresponding #onLoadStarted(int, MediaPeriodId, LoadEventInfo, MediaLoadData)
event.mediaLoadData - The MediaSourceEventListener.MediaLoadData defining the data being loaded.public final void onLoadCanceled(int windowIndex,
@Nullable
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData)
MediaSourceEventListeneronLoadCanceled in interface MediaSourceEventListenerwindowIndex - The window index in the timeline of the media source this load belongs to.mediaPeriodId - The MediaSource.MediaPeriodId this load belongs to. Null if the load does not
belong to a specific media period.loadEventInfo - The MediaSourceEventListener.LoadEventInfo corresponding to the event. The values of MediaSourceEventListener.LoadEventInfo.elapsedRealtimeMs and MediaSourceEventListener.LoadEventInfo.bytesLoaded are relative to the
corresponding #onLoadStarted(int, MediaPeriodId, LoadEventInfo, MediaLoadData)
event.mediaLoadData - The MediaSourceEventListener.MediaLoadData defining the data being loaded.public final void onLoadError(int windowIndex,
@Nullable
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.LoadEventInfo loadEventInfo,
MediaSourceEventListener.MediaLoadData mediaLoadData,
java.io.IOException error,
boolean wasCanceled)
MediaSourceEventListenerThe error may or may not have resulted in the load being canceled, as indicated by the
wasCanceled parameter. If the load was canceled, MediaSourceEventListener.onLoadCanceled(int, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId, com.google.android.exoplayer2.source.MediaSourceEventListener.LoadEventInfo, com.google.android.exoplayer2.source.MediaSourceEventListener.MediaLoadData) will
not be called in addition to this method.
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 and continue. Hence applications should
not implement this method to display a user visible error or initiate an application
level retry (Player.EventListener#onPlayerError 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.
onLoadError in interface MediaSourceEventListenerwindowIndex - The window index in the timeline of the media source this load belongs to.mediaPeriodId - The MediaSource.MediaPeriodId this load belongs to. Null if the load does not
belong to a specific media period.loadEventInfo - The MediaSourceEventListener.LoadEventInfo corresponding to the event. The values of MediaSourceEventListener.LoadEventInfo.elapsedRealtimeMs and MediaSourceEventListener.LoadEventInfo.bytesLoaded are relative to the
corresponding #onLoadStarted(int, MediaPeriodId, LoadEventInfo, MediaLoadData)
event.mediaLoadData - The MediaSourceEventListener.MediaLoadData defining the data being loaded.error - The load error.wasCanceled - Whether the load was canceled as a result of the error.public final void onReadingStarted(int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId)
MediaSourceEventListeneronReadingStarted in interface MediaSourceEventListenerwindowIndex - The window index in the timeline this media period belongs to.mediaPeriodId - The MediaSource.MediaPeriodId of the media period being read from.public final void onUpstreamDiscarded(int windowIndex,
@Nullable
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.MediaLoadData mediaLoadData)
MediaSourceEventListeneronUpstreamDiscarded in interface MediaSourceEventListenerwindowIndex - The window index in the timeline of the media source this load belongs to.mediaPeriodId - The MediaSource.MediaPeriodId the media belongs to.mediaLoadData - The MediaSourceEventListener.MediaLoadData defining the media being discarded.public final void onDownstreamFormatChanged(int windowIndex,
@Nullable
MediaSource.MediaPeriodId mediaPeriodId,
MediaSourceEventListener.MediaLoadData mediaLoadData)
MediaSourceEventListenerSampleStreams provided by the source changes).onDownstreamFormatChanged in interface MediaSourceEventListenerwindowIndex - The window index in the timeline of the media source this load belongs to.mediaPeriodId - The MediaSource.MediaPeriodId the media belongs to.mediaLoadData - The MediaSourceEventListener.MediaLoadData defining the newly selected downstream data.public final void onTimelineChanged(Timeline timeline, @Nullable java.lang.Object manifest, @Player.TimelineChangeReason int reason)
Player.EventListenerNote that if the timeline has changed then a position discontinuity may also have
occurred. For example, the current period index may have changed as a result of periods being
added or removed from the timeline. This will not be reported via a separate call to
Player.EventListener.onPositionDiscontinuity(int).
onTimelineChanged in interface Player.EventListenertimeline - The latest timeline. Never null, but may be empty.manifest - The latest manifest. May be null.reason - The Player.TimelineChangeReason responsible for this timeline change.public final void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections)
Player.EventListeneronTracksChanged in interface Player.EventListenertrackGroups - The available tracks. Never null, but may be of length zero.trackSelections - The track selections for each renderer. Never null and always of
length Player.getRendererCount(), but may contain null elements.public final void onLoadingChanged(boolean isLoading)
Player.EventListeneronLoadingChanged in interface Player.EventListenerisLoading - Whether the source is currently being loaded.public final void onPlayerStateChanged(boolean playWhenReady,
int playbackState)
Player.EventListenerPlayer.getPlayWhenReady() or Player.getPlaybackState() changes.onPlayerStateChanged in interface Player.EventListenerplayWhenReady - Whether playback will proceed when ready.playbackState - One of the STATE constants.public final void onRepeatModeChanged(@Player.RepeatMode int repeatMode)
Player.EventListenerPlayer.getRepeatMode() changes.onRepeatModeChanged in interface Player.EventListenerrepeatMode - The Player.RepeatMode used for playback.public final void onShuffleModeEnabledChanged(boolean shuffleModeEnabled)
Player.EventListenerPlayer.getShuffleModeEnabled() changes.onShuffleModeEnabledChanged in interface Player.EventListenershuffleModeEnabled - Whether shuffling of windows is enabled.public final void onPlayerError(ExoPlaybackException error)
Player.EventListenerPlayer.STATE_IDLE
immediately after this method is called. The player instance can still be used, and Player.release() must still be called on the player should it no longer be required.onPlayerError in interface Player.EventListenererror - The error.public final void onPositionDiscontinuity(@Player.DiscontinuityReason int reason)
Player.EventListenerWhen a position discontinuity occurs as a result of a change to the timeline this method
is not called. Player.EventListener.onTimelineChanged(Timeline, Object, int) is called in this
case.
onPositionDiscontinuity in interface Player.EventListenerreason - The Player.DiscontinuityReason responsible for the discontinuity.public final void onPlaybackParametersChanged(PlaybackParameters playbackParameters)
Player.EventListenerPlayer.setPlaybackParameters(PlaybackParameters), or the player itself may change
them (for example, if audio playback switches to passthrough mode, where speed adjustment is
no longer possible).onPlaybackParametersChanged in interface Player.EventListenerplaybackParameters - The playback parameters.public final void onSeekProcessed()
Player.EventListenerPlayer.EventListener.onPlayerStateChanged(boolean, int).onSeekProcessed in interface Player.EventListenerpublic final void onBandwidthSample(int elapsedMs,
long bytes,
long bitrate)
BandwidthMeter.EventListenerNote: The estimated bitrate is typically derived from more information than just bytes and elapsedMs.
onBandwidthSample in interface BandwidthMeter.EventListenerelapsedMs - The time taken to transfer the bytes, in milliseconds.bytes - The number of bytes transferred.bitrate - The estimated bitrate in bits/sec.public final void onDrmSessionAcquired()
DefaultDrmSessionEventListeneronDrmSessionAcquired in interface DefaultDrmSessionEventListenerpublic final void onDrmKeysLoaded()
DefaultDrmSessionEventListeneronDrmKeysLoaded in interface DefaultDrmSessionEventListenerpublic final void onDrmSessionManagerError(java.lang.Exception error)
DefaultDrmSessionEventListenerThis 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 and continue. Hence applications should
not implement this method to display a user visible error or initiate an application
level retry (Player.EventListener#onPlayerError 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.
onDrmSessionManagerError in interface DefaultDrmSessionEventListenererror - The corresponding exception.public final void onDrmKeysRestored()
DefaultDrmSessionEventListeneronDrmKeysRestored in interface DefaultDrmSessionEventListenerpublic final void onDrmKeysRemoved()
DefaultDrmSessionEventListeneronDrmKeysRemoved in interface DefaultDrmSessionEventListenerpublic final void onDrmSessionReleased()
DefaultDrmSessionEventListeneronDrmSessionReleased in interface DefaultDrmSessionEventListenerprotected java.util.Set<AnalyticsListener> getListeners()
@RequiresNonNull(value="player") protected AnalyticsListener.EventTime generateEventTime(Timeline timeline, int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId)
AnalyticsListener.EventTime for the specified timeline, window and media period id.