public static final class FakeTimeline.TimelineWindowDefinition extends Object
FakeTimeline.| Modifier and Type | Field | Description |
|---|---|---|
AdPlaybackState |
adPlaybackState |
|
static long |
DEFAULT_WINDOW_DURATION_US |
Default window duration in microseconds.
|
static long |
DEFAULT_WINDOW_OFFSET_IN_FIRST_PERIOD_US |
Default offset of a window in its first period in microseconds.
|
long |
defaultPositionUs |
|
long |
durationUs |
|
Object |
id |
|
boolean |
isDynamic |
|
boolean |
isLive |
|
boolean |
isPlaceholder |
|
boolean |
isSeekable |
|
MediaItem |
mediaItem |
|
int |
periodCount |
|
long |
windowOffsetInFirstPeriodUs |
| Constructor | Description |
|---|---|
TimelineWindowDefinition(boolean isSeekable,
boolean isDynamic,
long durationUs) |
Creates a window definition with one period.
|
TimelineWindowDefinition(int periodCount,
Object id) |
Creates a seekable, non-dynamic window definition with a duration of
DEFAULT_WINDOW_DURATION_US. |
TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
boolean isPlaceholder,
long durationUs,
long defaultPositionUs,
long windowOffsetInFirstPeriodUs,
AdPlaybackState adPlaybackState) |
Creates a window definition with ad groups.
|
TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
boolean isPlaceholder,
long durationUs,
long defaultPositionUs,
long windowOffsetInFirstPeriodUs,
AdPlaybackState adPlaybackState,
MediaItem mediaItem) |
Creates a window definition with ad groups and a custom media item.
|
TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
long durationUs) |
Creates a window definition.
|
TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
long durationUs,
AdPlaybackState adPlaybackState) |
Creates a window definition with ad groups.
|
| Modifier and Type | Method | Description |
|---|---|---|
static FakeTimeline.TimelineWindowDefinition |
createPlaceholder(Object tag) |
Creates a window definition that corresponds to a placeholder timeline using the given tag.
|
public static final long DEFAULT_WINDOW_DURATION_US
public static final long DEFAULT_WINDOW_OFFSET_IN_FIRST_PERIOD_US
public final int periodCount
public final Object id
public final MediaItem mediaItem
public final boolean isSeekable
public final boolean isDynamic
public final boolean isLive
public final boolean isPlaceholder
public final long durationUs
public final long defaultPositionUs
public final long windowOffsetInFirstPeriodUs
public final AdPlaybackState adPlaybackState
public TimelineWindowDefinition(int periodCount,
Object id)
DEFAULT_WINDOW_DURATION_US.periodCount - The number of periods in the window. Each period get an equal slice of the
total window duration.id - The UID of the window.public TimelineWindowDefinition(boolean isSeekable,
boolean isDynamic,
long durationUs)
isSeekable - Whether the window is seekable.isDynamic - Whether the window is dynamic.durationUs - The duration of the window in microseconds.public TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
long durationUs)
periodCount - The number of periods in the window. Each period get an equal slice of the
total window duration.id - The UID of the window.isSeekable - Whether the window is seekable.isDynamic - Whether the window is dynamic.durationUs - The duration of the window in microseconds.public TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
long durationUs,
AdPlaybackState adPlaybackState)
periodCount - The number of periods in the window. Each period get an equal slice of the
total window duration.id - The UID of the window.isSeekable - Whether the window is seekable.isDynamic - Whether the window is dynamic.durationUs - The duration of the window in microseconds.adPlaybackState - The ad playback state.public TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
boolean isPlaceholder,
long durationUs,
long defaultPositionUs,
long windowOffsetInFirstPeriodUs,
AdPlaybackState adPlaybackState)
periodCount - The number of periods in the window. Each period get an equal slice of the
total window duration.id - The UID of the window.isSeekable - Whether the window is seekable.isDynamic - Whether the window is dynamic.isLive - Whether the window is live.isPlaceholder - Whether the window is a placeholder.durationUs - The duration of the window in microseconds.defaultPositionUs - The default position of the window in microseconds.windowOffsetInFirstPeriodUs - The offset of the window in the first period, in
microseconds.adPlaybackState - The ad playback state.public TimelineWindowDefinition(int periodCount,
Object id,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
boolean isPlaceholder,
long durationUs,
long defaultPositionUs,
long windowOffsetInFirstPeriodUs,
AdPlaybackState adPlaybackState,
MediaItem mediaItem)
periodCount - The number of periods in the window. Each period get an equal slice of the
total window duration.id - The UID of the window.isSeekable - Whether the window is seekable.isDynamic - Whether the window is dynamic.isLive - Whether the window is live.isPlaceholder - Whether the window is a placeholder.durationUs - The duration of the window in microseconds.defaultPositionUs - The default position of the window in microseconds.windowOffsetInFirstPeriodUs - The offset of the window in the first period, in
microseconds.adPlaybackState - The ad playback state.mediaItem - The media item to include in the timeline.public static FakeTimeline.TimelineWindowDefinition createPlaceholder(Object tag)
tag - The tag to use in the timeline.