Class AnalyticsListener.EventTime
- java.lang.Object
-
- com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime
-
- Enclosing interface:
- AnalyticsListener
public static final class AnalyticsListener.EventTime extends Object
Time information of an event.
-
-
Field Summary
Fields Modifier and Type Field Description MediaSource.MediaPeriodIdcurrentMediaPeriodIdMedia period identifierfor the currently playing media period at the time of the event, ornullif no current media period identifier is available.longcurrentPlaybackPositionMsPosition in thecurrent timeline windowor the currently playing ad at the time of the event, in milliseconds.TimelinecurrentTimelineThe currentTimelineat the time of the event (equivalent toPlayer.getCurrentTimeline()).intcurrentWindowIndexThe current window index incurrentTimelineat the time of the event, or the prospective window index if the timeline is not yet known and empty (equivalent toPlayer.getCurrentMediaItemIndex()).longeventPlaybackPositionMsPosition in the window or ad this event belongs to at the time of the event, in milliseconds.MediaSource.MediaPeriodIdmediaPeriodIdMedia period identifierfor the media period this event belongs to, ornullif the event is not associated with a specific media period.longrealtimeMsElapsed real-time as returned bySystemClock.elapsedRealtime()at the time of the event, in milliseconds.TimelinetimelineMost recentTimelinethat contains the event position.longtotalBufferedDurationMsTotal buffered duration fromcurrentPlaybackPositionMsat the time of the event, in milliseconds.intwindowIndexWindow index in thetimelinethis 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)
-
-
-
Field Detail
-
realtimeMs
public final long realtimeMs
Elapsed real-time as returned bySystemClock.elapsedRealtime()at the time of the event, in milliseconds.
-
windowIndex
public final int windowIndex
Window index in thetimelinethis event belongs to, or the prospective window index if the timeline is not yet known and empty.
-
mediaPeriodId
@Nullable public final MediaSource.MediaPeriodId mediaPeriodId
Media period identifierfor the media period this event belongs to, ornullif 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 currentTimeline
The currentTimelineat the time of the event (equivalent toPlayer.getCurrentTimeline()).
-
currentWindowIndex
public final int currentWindowIndex
The current window index incurrentTimelineat the time of the event, or the prospective window index if the timeline is not yet known and empty (equivalent toPlayer.getCurrentMediaItemIndex()).
-
currentMediaPeriodId
@Nullable public final MediaSource.MediaPeriodId currentMediaPeriodId
Media period identifierfor the currently playing media period at the time of the event, ornullif no current media period identifier is available.
-
currentPlaybackPositionMs
public final long currentPlaybackPositionMs
Position in thecurrent timeline windowor the currently playing ad at the time of the event, in milliseconds.
-
totalBufferedDurationMs
public final long totalBufferedDurationMs
Total buffered duration fromcurrentPlaybackPositionMsat 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, int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, long eventPlaybackPositionMs, Timeline currentTimeline, int currentWindowIndex, @Nullable MediaSource.MediaPeriodId currentMediaPeriodId, long currentPlaybackPositionMs, long totalBufferedDurationMs)- Parameters:
realtimeMs- Elapsed real-time as returned bySystemClock.elapsedRealtime()at the time of the event, in milliseconds.timeline- Most recentTimelinethat contains the event position.windowIndex- Window index in thetimelinethis event belongs to, or the prospective window index if the timeline is not yet known and empty.mediaPeriodId-Media period identifierfor the media period this event belongs to, ornullif 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 currentTimelineat the time of the event (equivalent toPlayer.getCurrentTimeline()).currentWindowIndex- The current window index incurrentTimelineat the time of the event, or the prospective window index if the timeline is not yet known and empty (equivalent toPlayer.getCurrentMediaItemIndex()).currentMediaPeriodId-Media period identifierfor the currently playing media period at the time of the event, ornullif 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 fromcurrentPlaybackPositionMsat the time of the event, in milliseconds. This includes pre-buffered data for subsequent ads and windows.
-
-