Class RepeatModeActionProvider
- java.lang.Object
-
- com.google.android.exoplayer2.ext.mediasession.RepeatModeActionProvider
-
- All Implemented Interfaces:
MediaSessionConnector.CustomActionProvider
@Deprecated public final class RepeatModeActionProvider extends Object implements MediaSessionConnector.CustomActionProvider
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Provides a custom action for toggling repeat modes.
-
-
Field Summary
Fields Modifier and Type Field Description static @com.google.android.exoplayer2.util.RepeatModeUtil.RepeatToggleModes int
DEFAULT_REPEAT_TOGGLE_MODES
Deprecated.The default repeat toggle modes.
-
Constructor Summary
Constructors Constructor Description RepeatModeActionProvider(Context context)
Deprecated.Creates a new instance.RepeatModeActionProvider(Context context, @com.google.android.exoplayer2.util.RepeatModeUtil.RepeatToggleModes int repeatToggleModes)
Deprecated.Creates a new instance enabling the given repeat toggle modes.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description android.support.v4.media.session.PlaybackStateCompat.CustomAction
getCustomAction(Player player)
Deprecated.Returns aPlaybackStateCompat.CustomAction
which will be published to the media session by the connector ornull
if this action should not be published at the given player state.void
onCustomAction(Player player, String action, Bundle extras)
Deprecated.Called when a custom action provided by this provider is sent to the media session.
-
-
-
Field Detail
-
DEFAULT_REPEAT_TOGGLE_MODES
@RepeatToggleModes public static final @com.google.android.exoplayer2.util.RepeatModeUtil.RepeatToggleModes int DEFAULT_REPEAT_TOGGLE_MODES
Deprecated.The default repeat toggle modes.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RepeatModeActionProvider
public RepeatModeActionProvider(Context context)
Deprecated.Creates a new instance.Equivalent to
RepeatModeActionProvider(context, DEFAULT_REPEAT_TOGGLE_MODES)
.- Parameters:
context
- The context.
-
RepeatModeActionProvider
public RepeatModeActionProvider(Context context, @RepeatToggleModes @com.google.android.exoplayer2.util.RepeatModeUtil.RepeatToggleModes int repeatToggleModes)
Deprecated.Creates a new instance enabling the given repeat toggle modes.- Parameters:
context
- The context.repeatToggleModes
- The toggle modes to enable.
-
-
Method Detail
-
onCustomAction
public void onCustomAction(Player player, String action, @Nullable Bundle extras)
Deprecated.Description copied from interface:MediaSessionConnector.CustomActionProvider
Called when a custom action provided by this provider is sent to the media session.- Specified by:
onCustomAction
in interfaceMediaSessionConnector.CustomActionProvider
- 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.
-
getCustomAction
public android.support.v4.media.session.PlaybackStateCompat.CustomAction getCustomAction(Player player)
Deprecated.Description copied from interface:MediaSessionConnector.CustomActionProvider
Returns aPlaybackStateCompat.CustomAction
which will be published to the media session by the connector ornull
if this action should not be published at the given player state.- Specified by:
getCustomAction
in interfaceMediaSessionConnector.CustomActionProvider
- Parameters:
player
- The player connected to the media session.- Returns:
- The custom action to be included in the session playback state or
null
.
-
-