docs/doc/reference/com/google/android/exoplayer2/source/MaskingMediaSource.PlaceholderTimeline.html
Package com.google.android.exoplayer2.source
All Implemented Interfaces:BundleableEnclosing class:MaskingMediaSource
public static final classMaskingMediaSource.PlaceholderTimelineextends[Timeline](../Timeline.html "class in com.google.android.exoplayer2")
A timeline with one dynamic window with a period of indeterminate duration.
-
Timeline.Period, Timeline.RemotableTimeline, Timeline.Window
-
Bundleable.Creator<T extends Bundleable>
-
CREATOR, EMPTY
Constructors | Constructor | Description |
| --- | --- |
| PlaceholderTimeline(MediaItem mediaItem) |
Creates a new instance with the given media item.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| int | getIndexOfPeriod(Object uid) |
Returns the index of the period identified by its unique Timeline.Period.uid, or C.INDEX_UNSET if the period is not in the timeline.
|
| Timeline.Period | getPeriod(int periodIndex, Timeline.Period period, boolean setIds) |
Populates a Timeline.Period with data for the period at the specified index.
|
| int | getPeriodCount() |
Returns the number of periods in the timeline.
|
| Object | getUidOfPeriod(int periodIndex) |
Returns the unique id of the period identified by its index in the timeline.
|
| Timeline.Window | getWindow(int windowIndex, Timeline.Window window, long defaultPositionProjectionUs) |
Populates a Timeline.Window with data for the window at the specified index.
|
| int | getWindowCount() |
Returns the number of windows in the timeline.
|
-
equals, getFirstWindowIndex, getLastWindowIndex, getNextPeriodIndex, getNextWindowIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getPreviousWindowIndex, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundleWithOneWindowOnly
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public PlaceholderTimeline([MediaItem](../MediaItem.html "class in com.google.android.exoplayer2")mediaItem)
Creates a new instance with the given media item.
-
public int getWindowCount()
Description copied from class: Timeline
Returns the number of windows in the timeline.
Specified by:getWindowCount in class Timeline
-
public[Timeline.Window](../Timeline.Window.html "class in com.google.android.exoplayer2")getWindow(int windowIndex,[Timeline.Window](../Timeline.Window.html "class in com.google.android.exoplayer2")window,
long defaultPositionProjectionUs)
Description copied from class: Timeline
Populates a Timeline.Window with data for the window at the specified index.
Specified by:getWindow in class TimelineParameters:windowIndex - The index of the window.window - The Timeline.Window to populate. Must not be null.defaultPositionProjectionUs - A duration into the future that the populated window's default start position should be projected.Returns:The populated Timeline.Window, for convenience.
-
public int getPeriodCount()
Description copied from class: Timeline
Returns the number of periods in the timeline.
Specified by:getPeriodCount in class Timeline
-
public[Timeline.Period](../Timeline.Period.html "class in com.google.android.exoplayer2")getPeriod(int periodIndex,[Timeline.Period](../Timeline.Period.html "class in com.google.android.exoplayer2")period,
boolean setIds)
Description copied from class: Timeline
Populates a Timeline.Period with data for the period at the specified index.
Specified by:getPeriod in class TimelineParameters:periodIndex - The index of the period.period - The Timeline.Period to populate. Must not be null.setIds - Whether Timeline.Period.id and Timeline.Period.uid should be populated. If false, the fields will be set to null. The caller should pass false for efficiency reasons unless the fields are required.Returns:The populated Timeline.Period, for convenience.
-
public int getIndexOfPeriod([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")uid)
Description copied from class: Timeline
Returns the index of the period identified by its unique Timeline.Period.uid, or C.INDEX_UNSET if the period is not in the timeline.
Specified by:getIndexOfPeriod in class TimelineParameters:uid - A unique identifier for a period.Returns:The index of the period, or C.INDEX_UNSET if the period was not found.
-
public[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")getUidOfPeriod(int periodIndex)
Description copied from class: Timeline
Returns the unique id of the period identified by its index in the timeline.
Specified by:getUidOfPeriod in class TimelineParameters:periodIndex - The index of the period.Returns:The unique id of the period.