AnalyticsListener.EventTime


@UnstableApi
class AnalyticsListener.EventTime


Time information of an event.

Summary

Public constructors

EventTime(
    realtimeMs: Long,
    timeline: Timeline!,
    windowIndex: Int,
    mediaPeriodId: MediaSource.MediaPeriodId?,
    eventPlaybackPositionMs: Long,
    currentTimeline: Timeline!,
    currentWindowIndex: Int,
    currentMediaPeriodId: MediaSource.MediaPeriodId?,
    currentPlaybackPositionMs: Long,
    totalBufferedDurationMs: Long
)

Public functions

Boolean
equals(o: Any?)
Int

Public properties

MediaSource.MediaPeriodId?

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

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

Timeline!

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

Int

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 getCurrentMediaItemIndex).

Long

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

MediaSource.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

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.

Long

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

Int

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

Public constructors

EventTime

EventTime(
    realtimeMs: Long,
    timeline: Timeline!,
    windowIndex: Int,
    mediaPeriodId: MediaSource.MediaPeriodId?,
    eventPlaybackPositionMs: Long,
    currentTimeline: Timeline!,
    currentWindowIndex: Int,
    currentMediaPeriodId: MediaSource.MediaPeriodId?,
    currentPlaybackPositionMs: Long,
    totalBufferedDurationMs: Long
)
Parameters
realtimeMs: Long

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.

windowIndex: Int

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

mediaPeriodId: MediaSource.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: Long

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

currentTimeline: Timeline!

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

currentWindowIndex: Int

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 getCurrentMediaItemIndex).

currentMediaPeriodId: MediaSource.MediaPeriodId?

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: Long

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

totalBufferedDurationMs: Long

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

Public functions

equals

fun equals(o: Any?): Boolean

hashCode

fun hashCode(): Int

Public properties

currentMediaPeriodId

val currentMediaPeriodIdMediaSource.MediaPeriodId?

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

val currentPlaybackPositionMsLong

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

currentTimeline

val currentTimelineTimeline!

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

currentWindowIndex

val currentWindowIndexInt

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 getCurrentMediaItemIndex).

eventPlaybackPositionMs

val eventPlaybackPositionMsLong

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

mediaPeriodId

val mediaPeriodIdMediaSource.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.

realtimeMs

val realtimeMsLong

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

timeline

val timelineTimeline!

Most recent Timeline that contains the event position.

totalBufferedDurationMs

val totalBufferedDurationMsLong

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

windowIndex

val windowIndexInt

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