rememberCreditState
Remembers the value of a CreditState created based on the passed Player and launches a coroutine to listen to the Player's changes. If the Player instance changes between compositions, this produces and remembers a new CreditState.
Sample usage:
val creditState = rememberCreditState(player)
if (creditState.isInCredit) {
Button(onClick = creditState::onClick) {
Text(text = "Skip")
}
}
Content copied to clipboard