Class RepeatModeActionProvider

    • Field Detail

      • DEFAULT_REPEAT_TOGGLE_MODES

        @RepeatToggleModes
        public static final @com.google.android.exoplayer2.util.RepeatModeUtil.RepeatToggleModes int DEFAULT_REPEAT_TOGGLE_MODES
        The default repeat toggle modes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RepeatModeActionProvider

        public RepeatModeActionProvider​(Context context)
        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)
        Creates a new instance enabling the given repeat toggle modes.
        Parameters:
        context - The context.
        repeatToggleModes - The toggle modes to enable.
    • Method Detail

      • getCustomAction

        public android.support.v4.media.session.PlaybackStateCompat.CustomAction getCustomAction​(Player player)
        Description copied from interface: MediaSessionConnector.CustomActionProvider
        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.
        Specified by:
        getCustomAction in interface MediaSessionConnector.CustomActionProvider
        Parameters:
        player - The player connected to the media session.
        Returns:
        The custom action to be included in the session playback state or null.