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, enabledModes: Int)

Verifies whether a given repeatMode is enabled in the bitmask enabledModes.

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, enabledModes: Int): Int

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

Parameters
@Player.RepeatMode currentMode: Int

The current repeat mode.

enabledModes: Int

Bitmask of enabled modes.

Returns
Int

The next repeat mode.

isRepeatModeEnabled

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

Verifies whether a given repeatMode is enabled in the bitmask enabledModes.

Parameters
@Player.RepeatMode repeatMode: Int

The mode to check.

enabledModes: Int

The bitmask representing the enabled modes.

Returns
Boolean

true if enabled.