SimpleBasePlayer.MediaItemData


protected final class SimpleBasePlayer.MediaItemData


An immutable description of an item in the playlist, containing both static setup information like MediaItem and dynamic data that is generally read from the media like the duration.

Summary

Nested types

A builder for MediaItemData objects.

Public fields

final long

The default position relative to the start of the media item at which to begin playback, in microseconds.

final long

The duration of the media item, in microseconds, or TIME_UNSET if unknown.

final long

The offset between elapsedRealtime and the time since the Unix epoch according to the clock of the media origin server, or TIME_UNSET if unknown or not applicable.

final boolean

Whether this media item may change over time, for example a moving live window.

final boolean

Whether this media item contains placeholder information because the real information has yet to be loaded.

final boolean

Whether it's possible to seek within this media item.

final @Nullable MediaItem.LiveConfiguration

The active MediaItem.LiveConfiguration, or null if the media item is not live.

final @Nullable Object

The manifest of the media item, or null if not applicable.

final MediaItem

The MediaItem.

final @Nullable MediaMetadata

The MediaMetadata, including static data from the MediaItem and the media's Format, as well any dynamic metadata that has been parsed from the media.

final ImmutableList<SimpleBasePlayer.PeriodData>

The list of periods in this media item, or an empty list to assume a single period without ads and the same duration as the media item.

final long

The position of the start of this media item relative to the start of the first period belonging to it, in microseconds.

final long

The start time of the live presentation, in milliseconds since the Unix epoch, or TIME_UNSET if unknown or not applicable.

final Tracks

The Tracks of this media item.

final Object

The unique identifier of this media item.

final long

The start time of the live window, in milliseconds since the Unix epoch, or TIME_UNSET if unknown or not applicable.

Public methods

SimpleBasePlayer.MediaItemData.Builder

Returns a Builder pre-populated with the current values.

boolean
int

Public fields

defaultPositionUs

public final long defaultPositionUs

The default position relative to the start of the media item at which to begin playback, in microseconds.

durationUs

public final long durationUs

The duration of the media item, in microseconds, or TIME_UNSET if unknown.

elapsedRealtimeEpochOffsetMs

public final long elapsedRealtimeEpochOffsetMs

The offset between elapsedRealtime and the time since the Unix epoch according to the clock of the media origin server, or TIME_UNSET if unknown or not applicable.

isDynamic

public final boolean isDynamic

Whether this media item may change over time, for example a moving live window.

isPlaceholder

public final boolean isPlaceholder

Whether this media item contains placeholder information because the real information has yet to be loaded.

isSeekable

public final boolean isSeekable

Whether it's possible to seek within this media item.

liveConfiguration

public final @Nullable MediaItem.LiveConfiguration liveConfiguration

The active MediaItem.LiveConfiguration, or null if the media item is not live.

manifest

public final @Nullable Object manifest

The manifest of the media item, or null if not applicable.

mediaItem

public final MediaItem mediaItem

The MediaItem.

mediaMetadata

public final @Nullable MediaMetadata mediaMetadata

The MediaMetadata, including static data from the MediaItem and the media's Format, as well any dynamic metadata that has been parsed from the media. If null, the metadata is assumed to be the simple combination of the MediaItem metadata and the metadata of the selected Formats.

periods

public final ImmutableList<SimpleBasePlayer.PeriodDataperiods

The list of periods in this media item, or an empty list to assume a single period without ads and the same duration as the media item.

positionInFirstPeriodUs

public final long positionInFirstPeriodUs

The position of the start of this media item relative to the start of the first period belonging to it, in microseconds.

presentationStartTimeMs

public final long presentationStartTimeMs

The start time of the live presentation, in milliseconds since the Unix epoch, or TIME_UNSET if unknown or not applicable.

tracks

public final Tracks tracks

The Tracks of this media item.

uid

public final Object uid

The unique identifier of this media item.

windowStartTimeMs

public final long windowStartTimeMs

The start time of the live window, in milliseconds since the Unix epoch, or TIME_UNSET if unknown or not applicable.

Public methods

buildUpon

public SimpleBasePlayer.MediaItemData.Builder buildUpon()

Returns a Builder pre-populated with the current values.

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()