public class DefaultControlDispatcher extends java.lang.Object implements ControlDispatcher
ControlDispatcher that dispatches all operations to the player without
modification.| Constructor and Description |
|---|
DefaultControlDispatcher() |
| 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. |
public boolean dispatchSetPlayWhenReady(Player player, boolean playWhenReady)
ControlDispatcherPlayer.setPlayWhenReady(boolean) operation.dispatchSetPlayWhenReady in interface ControlDispatcherplayer - The Player to which the operation should be dispatched.playWhenReady - Whether playback should proceed when ready.public boolean dispatchSeekTo(Player player, int windowIndex, long positionMs)
ControlDispatcherPlayer.seekTo(int, long) operation.dispatchSeekTo in interface ControlDispatcherplayer - 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.public boolean dispatchSetRepeatMode(Player player, int repeatMode)
ControlDispatcherPlayer.setRepeatMode(int) operation.dispatchSetRepeatMode in interface ControlDispatcherplayer - The Player to which the operation should be dispatched.repeatMode - The repeat mode.public boolean dispatchSetShuffleModeEnabled(Player player, boolean shuffleModeEnabled)
ControlDispatcherPlayer.setShuffleModeEnabled(boolean) operation.dispatchSetShuffleModeEnabled in interface ControlDispatcherplayer - The Player to which the operation should be dispatched.shuffleModeEnabled - Whether shuffling is enabled.