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

val currentPlaybackPositionMs: Long

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

currentTimeline

val currentTimeline: Timeline!

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

currentWindowIndex

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

eventPlaybackPositionMs

val eventPlaybackPositionMs: Long

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

mediaPeriodId

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

realtimeMs

val realtimeMs: Long

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

timeline

val timeline: Timeline!

Most recent Timeline that contains the event position.

totalBufferedDurationMs

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

windowIndex

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