androidx.media3.ui.compose.state

Classes

NextButtonState

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

PlayPauseButtonState

State that converts the necessary information from the Player to correctly deal with a UI component representing a PlayPause button.

PresentationState

State that holds information to correctly deal with UI components related to the rendering of frames to a surface.

PreviousButtonState

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

RepeatButtonState

State that holds all interactions to correctly deal with a UI component representing a Repeat On/All/Off button.

ShuffleButtonState

State that holds all interactions to correctly deal with a UI component representing a Shuffle On/Off button.

Top-level functions summary

NextButtonState

Remembers the value of NextButtonState created based on the passed Player and launch a coroutine to listen to Player's changes.

PlayPauseButtonState

Remembers the value of PlayPauseButtonState created based on the passed Player and launch a coroutine to listen to Player's changes.

PresentationState

Remembers the value of PresentationState created based on the passed Player and launches a coroutine to listen to Player's changes.

PreviousButtonState

Remembers the value of PreviousButtonState created based on the passed Player and launch a coroutine to listen to Player's changes.

RepeatButtonState
@UnstableApi
@Composable
rememberRepeatButtonState(
    player: Player,
    toggleModeSequence: List<@Player.RepeatMode Int>
)

Remember the value of RepeatButtonState created based on the passed Player and launch a coroutine to listen to Player's changes.

ShuffleButtonState

Remember the value of ShuffleButtonState created based on the passed Player and launch a coroutine to listen to Player's changes.

Top-level functions

rememberNextButtonState

@UnstableApi
@Composable
fun rememberNextButtonState(player: Player): NextButtonState

Remembers the value of NextButtonState created based on the passed Player and launch a coroutine to listen to Player's changes. If the Player instance changes between compositions, produce and remember a new value.

rememberPlayPauseButtonState

@UnstableApi
@Composable
fun rememberPlayPauseButtonState(player: Player): PlayPauseButtonState

Remembers the value of PlayPauseButtonState created based on the passed Player and launch a coroutine to listen to Player's changes. If the Player instance changes between compositions, produce and remember a new value.

rememberPresentationState

@UnstableApi
@Composable
fun rememberPresentationState(player: Player): PresentationState

Remembers the value of PresentationState created based on the passed Player and launches a coroutine to listen to Player's changes. If the Player instance changes between compositions, produces and remembers a new value.

rememberPreviousButtonState

@UnstableApi
@Composable
fun rememberPreviousButtonState(player: Player): PreviousButtonState

Remembers the value of PreviousButtonState created based on the passed Player and launch a coroutine to listen to Player's changes. If the Player instance changes between compositions, produce and remember a new value.

rememberRepeatButtonState

@UnstableApi
@Composable
fun rememberRepeatButtonState(
    player: Player,
    toggleModeSequence: List<@Player.RepeatMode Int> = listOf(Player.REPEAT_MODE_OFF, Player.REPEAT_MODE_ONE, Player.REPEAT_MODE_ALL)
): RepeatButtonState

Remember the value of RepeatButtonState created based on the passed Player and launch a coroutine to listen to Player's changes. If the Player instance changes between compositions, produce and remember a new value.

rememberShuffleButtonState

@UnstableApi
@Composable
fun rememberShuffleButtonState(player: Player): ShuffleButtonState

Remember the value of ShuffleButtonState created based on the passed Player and launch a coroutine to listen to Player's changes. If the Player instance changes between compositions, produce and remember a new value.