rememberPlayerState
fun rememberPlayerState(device: AudioDevice.Output? = null, onPlaybackComplete: () -> Unit? = null): PlayerState
Creates and remembers a PlayerState for audio playback.
Return
A remembered PlayerState
Parameters
device
Optional specific output device
onPlaybackComplete
Callback when playback finishes
fun rememberPlayerState(recording: AudioRecording, device: AudioDevice.Output? = null, onPlaybackComplete: () -> Unit? = null): PlayerState
Creates and remembers a PlayerState pre-loaded with an AudioRecording.
Return
A remembered PlayerState with the recording loaded
Parameters
recording
The recording to load
device
Optional specific output device
onPlaybackComplete
Callback when playback finishes