Back to Exoplayer

AnalyticsListener.EventTime (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/analytics/AnalyticsListener.EventTime.html

latest9.4 KB
Original Source

Package com.google.android.exoplayer2.analytics

Class AnalyticsListener.EventTime


public static final classAnalyticsListener.EventTimeextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Time information of an event.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | 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. | | long | currentPlaybackPositionMs | Position in the current timeline window or the currently playing ad at the time of the event, in milliseconds. | | Timeline | currentTimeline | The current Timeline at the time of the event (equivalent to Player.getCurrentTimeline()). | | int | 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()). | | 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 | Most recent Timeline that contains the event position. | | 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 Summary

Constructors | Constructor | Description | | --- | --- | | EventTime​(long realtimeMs, Timeline timeline, int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, long eventPlaybackPositionMs, Timeline currentTimeline, int currentWindowIndex, MediaSource.MediaPeriodId currentMediaPeriodId, long currentPlaybackPositionMs, long totalBufferedDurationMs) | |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | equals​(Object o) | | | int | hashCode() | |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

realtimeMs

public final long realtimeMs

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

- 

timeline

public final[Timeline](../Timeline.html "class in com.google.android.exoplayer2")timeline

Most recent Timeline that contains the event position.

- 

windowIndex

public final 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.

- 

mediaPeriodId

@Nullable
public final[MediaSource.MediaPeriodId](../source/MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")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

public final long eventPlaybackPositionMs

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

- 

currentTimeline

public final[Timeline](../Timeline.html "class in com.google.android.exoplayer2")currentTimeline

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

- 

currentWindowIndex

public final int 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

@Nullable
public final[MediaSource.MediaPeriodId](../source/MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")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

public final long currentPlaybackPositionMs

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

- 

totalBufferedDurationMs

public final long totalBufferedDurationMs

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

Constructor Detail

- 

EventTime

public EventTime​(long realtimeMs,[Timeline](../Timeline.html "class in com.google.android.exoplayer2")timeline,
                 int windowIndex,
                 @Nullable[MediaSource.MediaPeriodId](../source/MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")mediaPeriodId,
                 long eventPlaybackPositionMs,[Timeline](../Timeline.html "class in com.google.android.exoplayer2")currentTimeline,
                 int currentWindowIndex,
                 @Nullable[MediaSource.MediaPeriodId](../source/MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")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.

Method Detail

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")o)

Overrides:equals in class Object

- 

hashCode

public int hashCode()

Overrides:hashCode in class Object