rememberPlaylistState

Functions summary

PlaylistState

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

Functions

rememberPlaylistState

@UnstableApi
@Composable
fun rememberPlaylistState(player: Player?): PlaylistState

Remembers the value of PlaylistState 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.

Parameters
player: Player?

The Player instance to observe.

Returns
PlaylistState

A PlaylistState instance that updates based on the player's state.