docs/doc/reference/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.CustomActionProvider.html
Package com.google.android.exoplayer2.ext.mediasession
RepeatModeActionProviderEnclosing class:MediaSessionConnectorpublic static interfaceMediaSessionConnector.CustomActionProvider
Provides a PlaybackStateCompat.CustomAction to be published and handles the action when sent by a media controller.
All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| android.support.v4.media.session.PlaybackStateCompat.CustomAction | getCustomAction(Player player) |
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(Player player, String action, Bundle extras) |
Called when a custom action provided by this provider is sent to the media session.
|
-
void onCustomAction([Player](../../Player.html "interface in com.google.android.exoplayer2")player,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")action,
@Nullable[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")extras)
Called when a custom action provided by this provider is sent to the media session.
Parameters:player - The player connected to the media session.action - The name of the action which was sent by a media controller.extras - Optional extras sent by a media controller, may be null.
-
@Nullable
android.support.v4.media.session.PlaybackStateCompat.CustomAction getCustomAction([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
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.
Parameters:player - The player connected to the media session.Returns:The custom action to be included in the session playback state or null.