public interface ControlDispatcher
Player.
Implementations may choose to suppress (e.g. prevent playback from resuming if audio focus is denied) or modify (e.g. change the seek position to prevent a user from seeking past a non-skippable advert) operations.
| Modifier and Type | Method and Description |
|---|---|
boolean |
dispatchSeekTo(Player player,
int windowIndex,
long positionMs)
Dispatches a
Player.seekTo(int, long) operation. |
boolean |
dispatchSetPlayWhenReady(Player player,
boolean playWhenReady)
Dispatches a
Player.setPlayWhenReady(boolean) operation. |
boolean |
dispatchSetRepeatMode(Player player,
int repeatMode)
Dispatches a
Player.setRepeatMode(int) operation. |
boolean |
dispatchSetShuffleModeEnabled(Player player,
boolean shuffleModeEnabled)
Dispatches a
Player.setShuffleModeEnabled(boolean) operation. |
boolean |
dispatchStop(Player player,
boolean reset)
Dispatches a
Player.stop() operation. |
boolean dispatchSetPlayWhenReady(Player player, boolean playWhenReady)
Player.setPlayWhenReady(boolean) operation.player - The Player to which the operation should be dispatched.playWhenReady - Whether playback should proceed when ready.boolean dispatchSeekTo(Player player, int windowIndex, long positionMs)
Player.seekTo(int, long) operation.player - The Player to which the operation should be dispatched.windowIndex - The index of the window.positionMs - The seek position in the specified window, or C.TIME_UNSET to seek to
the window's default position.boolean dispatchSetRepeatMode(Player player, int repeatMode)
Player.setRepeatMode(int) operation.player - The Player to which the operation should be dispatched.repeatMode - The repeat mode.boolean dispatchSetShuffleModeEnabled(Player player, boolean shuffleModeEnabled)
Player.setShuffleModeEnabled(boolean) operation.player - The Player to which the operation should be dispatched.shuffleModeEnabled - Whether shuffling is enabled.boolean dispatchStop(Player player, boolean reset)
Player.stop() operation.player - The Player to which the operation should be dispatched.reset - Whether the player should be reset.