public final class RepeatModeActionProvider extends Object implements MediaSessionConnector.CustomActionProvider
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_REPEAT_TOGGLE_MODES
The default repeat toggle modes.
|
| Constructor and Description |
|---|
RepeatModeActionProvider(Context context,
Player player)
Creates a new instance.
|
RepeatModeActionProvider(Context context,
Player player,
int repeatToggleModes)
Creates a new instance enabling the given repeat toggle modes.
|
| Modifier and Type | Method and Description |
|---|---|
PlaybackStateCompat.CustomAction |
getCustomAction()
Returns a
PlaybackStateCompat.CustomAction which will be published to the
media session by the connector or null if this action should not be published at the
given player state. |
void |
onCustomAction(String action,
Bundle extras)
Called when a custom action provided by this provider is sent to the media session.
|
public static final int DEFAULT_REPEAT_TOGGLE_MODES
public RepeatModeActionProvider(Context context, Player player)
Equivalent to RepeatModeActionProvider(context, player,
RepeatModeActionProvider.DEFAULT_REPEAT_TOGGLE_MODES).
context - The context.player - The player on which to toggle the repeat mode.public RepeatModeActionProvider(Context context, Player player, int repeatToggleModes)
context - The context.player - The player on which to toggle the repeat mode.repeatToggleModes - The toggle modes to enable.public void onCustomAction(String action, Bundle extras)
MediaSessionConnector.CustomActionProvideronCustomAction in interface MediaSessionConnector.CustomActionProvideraction - The name of the action which was sent by a media controller.extras - Optional extras sent by a media controller.public PlaybackStateCompat.CustomAction getCustomAction()
MediaSessionConnector.CustomActionProviderPlaybackStateCompat.CustomAction which will be published to the
media session by the connector or null if this action should not be published at the
given player state.getCustomAction in interface MediaSessionConnector.CustomActionProvidernull.