public static final class AnalyticsListener.EventTime
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
long |
currentPlaybackPositionMs
Position in the current timeline window (
timeline.getCurrentWindowIndex() or the
currently playing ad at the time of the event, in milliseconds. |
long |
eventPlaybackPositionMs
Position in the window or ad this event belongs to at the time of the event, in milliseconds.
|
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. |
long |
realtimeMs
Elapsed real-time as returned by
SystemClock.elapsedRealtime() at the time of the
event, in milliseconds. |
Timeline |
timeline
Timeline at the time of the event.
|
long |
totalBufferedDurationMs
Total buffered duration from
currentPlaybackPositionMs at the time of the event, in
milliseconds. |
int |
windowIndex
Window index in the
timeline this event belongs to, or the prospective window index
if the timeline is not yet known and empty. |
| Constructor and Description |
|---|
EventTime(long realtimeMs,
Timeline timeline,
int windowIndex,
MediaSource.MediaPeriodId mediaPeriodId,
long eventPlaybackPositionMs,
long currentPlaybackPositionMs,
long totalBufferedDurationMs) |
public final long realtimeMs
SystemClock.elapsedRealtime() at the time of the
event, in milliseconds.public final Timeline timeline
public final int windowIndex
timeline this event belongs to, or the prospective window index
if the timeline is not yet known and empty.@Nullable public final MediaSource.MediaPeriodId mediaPeriodId
null if the
event is not associated with a specific media period.public final long eventPlaybackPositionMs
public final long currentPlaybackPositionMs
timeline.getCurrentWindowIndex() or the
currently playing ad at the time of the event, in milliseconds.public final long totalBufferedDurationMs
currentPlaybackPositionMs at the time of the event, in
milliseconds. This includes pre-buffered data for subsequent ads and windows.public EventTime(long realtimeMs,
Timeline timeline,
int windowIndex,
@Nullable
MediaSource.MediaPeriodId mediaPeriodId,
long eventPlaybackPositionMs,
long currentPlaybackPositionMs,
long totalBufferedDurationMs)
realtimeMs - Elapsed real-time as returned by SystemClock.elapsedRealtime() at
the time of the event, in milliseconds.timeline - Timeline at the time of the event.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.currentPlaybackPositionMs - Position in the current timeline window (timeline.getCurrentWindowIndex() 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.