@UnstableApi
class NextButtonState


State that holds all interactions to correctly deal with a UI component representing a seek-to-next button.

This button has no internal state to maintain, it can only be enabled or disabled.

Summary

Public constructors

Public functions

suspend Nothing

Subscribes to updates from Player.Events and listens to Player.EVENT_AVAILABLE_COMMANDS_CHANGED in order to determine whether the button should be enabled, i.e. respond to user input.

Unit

Public properties

Boolean

determined by isCommandAvailable(Player.COMMAND_SEEK_TO_NEXT)

Public constructors

NextButtonState

NextButtonState(player: Player)

Public functions

observe

suspend fun observe(): Nothing

Subscribes to updates from Player.Events and listens to Player.EVENT_AVAILABLE_COMMANDS_CHANGED in order to determine whether the button should be enabled, i.e. respond to user input.

onClick

fun onClick(): Unit

Public properties

isEnabled

val isEnabledBoolean

determined by isCommandAvailable(Player.COMMAND_SEEK_TO_NEXT)