RepeatModeUtil


@UnstableApi
class RepeatModeUtil


Util class for repeat mode handling.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = )
@IntDef(flag = true, value = )
annotation RepeatModeUtil.RepeatToggleModes

Set of repeat toggle modes.

Constants

const Int

"Repeat All" button enabled.

const Int

All repeat mode buttons disabled.

const Int

"Repeat One" button enabled.

Public functions

java-static Int

Gets the next repeat mode out of enabledModes starting from currentMode.

java-static Boolean
isRepeatModeEnabled(
    @Player.RepeatMode repeatMode: Int,
    @RepeatModeUtil.RepeatToggleModes enabledModes: Int
)

Verifies whether a given Player.RepeatMode is enabled in the bitmask of .

Constants

REPEAT_TOGGLE_MODE_ALL

const val REPEAT_TOGGLE_MODE_ALL = 2: Int

"Repeat All" button enabled.

REPEAT_TOGGLE_MODE_NONE

const val REPEAT_TOGGLE_MODE_NONE = 0: Int

All repeat mode buttons disabled.

REPEAT_TOGGLE_MODE_ONE

const val REPEAT_TOGGLE_MODE_ONE = 1: Int

"Repeat One" button enabled.

Public functions

getNextRepeatMode

@Player.RepeatMode
java-static fun getNextRepeatMode(
    @Player.RepeatMode currentMode: Int,
    @RepeatModeUtil.RepeatToggleModes enabledModes: Int
): Int

Gets the next repeat mode out of enabledModes starting from currentMode.

Parameters
@Player.RepeatMode currentMode: Int

The current Player.RepeatMode.

@RepeatModeUtil.RepeatToggleModes enabledModes: Int

The bitmask of enabled RepeatToggleModes.

Returns
Int

The next repeat mode.

isRepeatModeEnabled

java-static fun isRepeatModeEnabled(
    @Player.RepeatMode repeatMode: Int,
    @RepeatModeUtil.RepeatToggleModes enabledModes: Int
): Boolean

Verifies whether a given Player.RepeatMode is enabled in the bitmask of .

Parameters
@Player.RepeatMode repeatMode: Int

The Player.RepeatMode to check.

@RepeatModeUtil.RepeatToggleModes enabledModes: Int

The bitmask of enabled RepeatToggleModes.

Returns
Boolean

true if enabled.