Class RepeatModeActionProvider

    • 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
                                        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.