public final class

AnalyticsListener.EventTime

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.analytics.AnalyticsListener.EventTime

Overview

Time information of an event.

Summary

Fields
public final MediaSource.MediaPeriodIdcurrentMediaPeriodId

Media period identifier for the currently playing media period at the time of the event, or null if no current media period identifier is available.

public final longcurrentPlaybackPositionMs

Position in the current timeline window or the currently playing ad at the time of the event, in milliseconds.

public final TimelinecurrentTimeline

The current Timeline at the time of the event (equivalent to Player.getCurrentTimeline()).

public final intcurrentWindowIndex

The current window index in AnalyticsListener.EventTime.currentTimeline at the time of the event, or the prospective window index if the timeline is not yet known and empty (equivalent to Player.getCurrentMediaItemIndex()).

public final longeventPlaybackPositionMs

Position in the window or ad this event belongs to at the time of the event, in milliseconds.

public final MediaSource.MediaPeriodIdmediaPeriodId

Media period identifier for the media period this event belongs to, or null if the event is not associated with a specific media period.

public final longrealtimeMs

Elapsed real-time as returned by SystemClock.elapsedRealtime() at the time of the event, in milliseconds.

public final Timelinetimeline

Most recent Timeline that contains the event position.

public final longtotalBufferedDurationMs

Total buffered duration from AnalyticsListener.EventTime.currentPlaybackPositionMs at the time of the event, in milliseconds.

public final intwindowIndex

Window index in the AnalyticsListener.EventTime.timeline this event belongs to, or the prospective window index if the timeline is not yet known and empty.

Constructors
publicEventTime(long realtimeMs, Timeline timeline, int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, long eventPlaybackPositionMs, Timeline currentTimeline, int currentWindowIndex, MediaSource.MediaPeriodId currentMediaPeriodId, long currentPlaybackPositionMs, long totalBufferedDurationMs)

Methods
public booleanequals(java.lang.Object o)

public inthashCode()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Fields

public final long realtimeMs

Elapsed real-time as returned by SystemClock.elapsedRealtime() at the time of the event, in milliseconds.

public final Timeline timeline

Most recent Timeline that contains the event position.

public final int windowIndex

Window index in the AnalyticsListener.EventTime.timeline this event belongs to, or the prospective window index if the timeline is not yet known and empty.

public final MediaSource.MediaPeriodId mediaPeriodId

Media period identifier for the media period this event belongs to, or null if the event is not associated with a specific media period.

public final long eventPlaybackPositionMs

Position in the window or ad this event belongs to at the time of the event, in milliseconds.

public final Timeline currentTimeline

The current Timeline at the time of the event (equivalent to Player.getCurrentTimeline()).

public final int currentWindowIndex

The current window index in AnalyticsListener.EventTime.currentTimeline at the time of the event, or the prospective window index if the timeline is not yet known and empty (equivalent to Player.getCurrentMediaItemIndex()).

public final MediaSource.MediaPeriodId currentMediaPeriodId

Media period identifier for the currently playing media period at the time of the event, or null if no current media period identifier is available.

public final long currentPlaybackPositionMs

Position in the current timeline window or the currently playing ad at the time of the event, in milliseconds.

public final long totalBufferedDurationMs

Total buffered duration from AnalyticsListener.EventTime.currentPlaybackPositionMs at the time of the event, in milliseconds. This includes pre-buffered data for subsequent ads and windows.

Constructors

public EventTime(long realtimeMs, Timeline timeline, int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, long eventPlaybackPositionMs, Timeline currentTimeline, int currentWindowIndex, MediaSource.MediaPeriodId currentMediaPeriodId, long currentPlaybackPositionMs, long totalBufferedDurationMs)

Parameters:

realtimeMs: Elapsed real-time as returned by SystemClock.elapsedRealtime() at the time of the event, in milliseconds.
timeline: Most recent Timeline that contains the event position.
windowIndex: Window index in the timeline this event belongs to, or the prospective window index if the timeline is not yet known and empty.
mediaPeriodId: Media period identifier for the media period this event belongs to, or null if the event is not associated with a specific media period.
eventPlaybackPositionMs: Position in the window or ad this event belongs to at the time of the event, in milliseconds.
currentTimeline: The current Timeline at the time of the event (equivalent to Player.getCurrentTimeline()).
currentWindowIndex: The current window index in currentTimeline at the time of the event, or the prospective window index if the timeline is not yet known and empty (equivalent to Player.getCurrentMediaItemIndex()).
currentMediaPeriodId: Media period identifier for the currently playing media period at the time of the event, or null if no current media period identifier is available.
currentPlaybackPositionMs: Position in the current timeline window or the currently playing ad at the time of the event, in milliseconds.
totalBufferedDurationMs: Total buffered duration from currentPlaybackPositionMs at the time of the event, in milliseconds. This includes pre-buffered data for subsequent ads and windows.

Methods

public boolean equals(java.lang.Object o)

public int hashCode()