docs/doc/reference/com/google/android/exoplayer2/testutil/FakeTimeline.TimelineWindowDefinition.html
Package com.google.android.exoplayer2.testutil
Enclosing class:FakeTimeline
public static final classFakeTimeline.TimelineWindowDefinitionextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Definition used to define a FakeTimeline.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| List<AdPlaybackState> | adPlaybackStates | |
| 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 | |
Constructors | 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) |
Deprecated.
Use TimelineWindowDefinition(int, Object, boolean, boolean, boolean, boolean, long, long, long, List, MediaItem) instead.
|
| TimelineWindowDefinition(int periodCount, Object id, boolean isSeekable, boolean isDynamic, boolean isLive, boolean isPlaceholder, long durationUs, long defaultPositionUs, long windowOffsetInFirstPeriodUs, List<AdPlaybackState> adPlaybackStates, 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.
|
All Methods Static Methods Concrete Methods | 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.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final long DEFAULT_WINDOW_DURATION_US
Default window duration in microseconds. See Also:Constant Field Values
-
public static final long DEFAULT_WINDOW_OFFSET_IN_FIRST_PERIOD_US
Default offset of a window in its first period in microseconds. See Also:Constant Field Values
-
public final int periodCount
-
public final[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")id
-
public final[MediaItem](../MediaItem.html "class in com.google.android.exoplayer2")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[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[AdPlaybackState](../source/ads/AdPlaybackState.html "class in com.google.android.exoplayer2.source.ads")> adPlaybackStates
-
public TimelineWindowDefinition(int periodCount,[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")id)
Creates a seekable, non-dynamic window definition with a duration of DEFAULT_WINDOW_DURATION_US.
Parameters: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)
Creates a window definition with one period.
Parameters: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](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")id,
boolean isSeekable,
boolean isDynamic,
long durationUs)
Creates a window definition.
Parameters: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](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")id,
boolean isSeekable,
boolean isDynamic,
long durationUs,[AdPlaybackState](../source/ads/AdPlaybackState.html "class in com.google.android.exoplayer2.source.ads")adPlaybackState)
Creates a window definition with ad groups.
Parameters: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](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")id,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
boolean isPlaceholder,
long durationUs,
long defaultPositionUs,
long windowOffsetInFirstPeriodUs,[AdPlaybackState](../source/ads/AdPlaybackState.html "class in com.google.android.exoplayer2.source.ads")adPlaybackState)
Creates a window definition with ad groups.
Parameters: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.
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public TimelineWindowDefinition(int periodCount,[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")id,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
boolean isPlaceholder,
long durationUs,
long defaultPositionUs,
long windowOffsetInFirstPeriodUs,[AdPlaybackState](../source/ads/AdPlaybackState.html "class in com.google.android.exoplayer2.source.ads")adPlaybackState,[MediaItem](../MediaItem.html "class in com.google.android.exoplayer2")mediaItem)
Deprecated.
Use TimelineWindowDefinition(int, Object, boolean, boolean, boolean, boolean, long, long, long, List, MediaItem) instead.
-
public TimelineWindowDefinition(int periodCount,[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")id,
boolean isSeekable,
boolean isDynamic,
boolean isLive,
boolean isPlaceholder,
long durationUs,
long defaultPositionUs,
long windowOffsetInFirstPeriodUs,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[AdPlaybackState](../source/ads/AdPlaybackState.html "class in com.google.android.exoplayer2.source.ads")> adPlaybackStates,[MediaItem](../MediaItem.html "class in com.google.android.exoplayer2")mediaItem)
Creates a window definition with ad groups and a custom media item.
Parameters: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.adPlaybackStates - The ad playback states for the periods.mediaItem - The media item to include in the timeline.
-
public static[FakeTimeline.TimelineWindowDefinition](FakeTimeline.TimelineWindowDefinition.html "class in com.google.android.exoplayer2.testutil")createPlaceholder([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")tag)
Creates a window definition that corresponds to a placeholder timeline using the given tag.
Parameters:tag - The tag to use in the timeline.