Timeline.RemotableTimeline
@UnstableApi
class Timeline.RemotableTimeline : Timeline
A concrete class of Timeline to restore a Timeline instance from a Bundle sent by another process via IBinder.
Summary
Public constructors |
|---|
RemotableTimeline( |
Public functions |
|
|---|---|
Int |
getFirstWindowIndex(shuffleModeEnabled: Boolean)Returns the index of the first window in the playback order depending on whether shuffling is enabled. |
Int |
getIndexOfPeriod(uid: Any!)Returns the index of the period identified by its unique |
Int |
getLastWindowIndex(shuffleModeEnabled: Boolean)Returns the index of the last window in the playback order depending on whether shuffling is enabled. |
Int |
getNextWindowIndex(Returns the index of the window after the window at index |
Timeline.Period! |
getPeriod(periodIndex: Int, period: Timeline.Period!, setIds: Boolean)Populates a |
Int |
Returns the number of periods in the timeline. |
Int |
getPreviousWindowIndex(Returns the index of the window before the window at index |
Any! |
getUidOfPeriod(periodIndex: Int)Returns the unique id of the period identified by its index in the timeline. |
Timeline.Window! |
getWindow(Populates a |
Int |
Returns the number of windows in the timeline. |
Inherited functions |
||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
RemotableTimeline
RemotableTimeline(
windows: ImmutableList<Timeline.Window!>!,
periods: ImmutableList<Timeline.Period!>!,
shuffledWindowIndices: IntArray<Int>!
)
Public functions
getFirstWindowIndex
fun getFirstWindowIndex(shuffleModeEnabled: Boolean): Int
Returns the index of the first window in the playback order depending on whether shuffling is enabled.
| Parameters | |
|---|---|
shuffleModeEnabled: Boolean |
Whether shuffling is enabled. |
| Returns | |
|---|---|
Int |
The index of the first window in the playback order, or |
getIndexOfPeriod
fun getIndexOfPeriod(uid: Any!): Int
Returns the index of the period identified by its unique uid, or INDEX_UNSET if the period is not in the timeline.
| Parameters | |
|---|---|
uid: Any! |
A unique identifier for a period. |
| Returns | |
|---|---|
Int |
The index of the period, or |
getLastWindowIndex
fun getLastWindowIndex(shuffleModeEnabled: Boolean): Int
Returns the index of the last window in the playback order depending on whether shuffling is enabled.
| Parameters | |
|---|---|
shuffleModeEnabled: Boolean |
Whether shuffling is enabled. |
| Returns | |
|---|---|
Int |
The index of the last window in the playback order, or |
getNextWindowIndex
fun getNextWindowIndex(
windowIndex: Int,
@Player.RepeatMode repeatMode: Int,
shuffleModeEnabled: Boolean
): Int
Returns the index of the window after the window at index windowIndex depending on the repeatMode and whether shuffling is enabled.
| Parameters | |
|---|---|
windowIndex: Int |
Index of a window in the timeline. |
@Player.RepeatMode repeatMode: Int |
A repeat mode. |
shuffleModeEnabled: Boolean |
Whether shuffling is enabled. |
| Returns | |
|---|---|
Int |
The index of the next window, or |
getPeriod
fun getPeriod(periodIndex: Int, period: Timeline.Period!, setIds: Boolean): Timeline.Period!
Populates a Period with data for the period at the specified index.
| Parameters | |
|---|---|
periodIndex: Int |
The index of the period. |
period: Timeline.Period! |
The |
setIds: Boolean |
Whether |
| Returns | |
|---|---|
Timeline.Period! |
The populated |
getPreviousWindowIndex
fun getPreviousWindowIndex(
windowIndex: Int,
@Player.RepeatMode repeatMode: Int,
shuffleModeEnabled: Boolean
): Int
Returns the index of the window before the window at index windowIndex depending on the repeatMode and whether shuffling is enabled.
| Parameters | |
|---|---|
windowIndex: Int |
Index of a window in the timeline. |
@Player.RepeatMode repeatMode: Int |
A repeat mode. |
shuffleModeEnabled: Boolean |
Whether shuffling is enabled. |
| Returns | |
|---|---|
Int |
The index of the previous window, or |
getUidOfPeriod
fun getUidOfPeriod(periodIndex: Int): Any!
Returns the unique id of the period identified by its index in the timeline.
| Parameters | |
|---|---|
periodIndex: Int |
The index of the period. |
| Returns | |
|---|---|
Any! |
The unique id of the period. |
getWindow
fun getWindow(
windowIndex: Int,
window: Timeline.Window!,
defaultPositionProjectionUs: Long
): Timeline.Window!
Populates a Window with data for the window at the specified index.
| Parameters | |
|---|---|
windowIndex: Int |
The index of the window. |
window: Timeline.Window! |
The |
defaultPositionProjectionUs: Long |
A duration into the future that the populated window's default start position should be projected. |
| Returns | |
|---|---|
Timeline.Window! |
The populated |