AudioPlayerViewModel

ViewModel class for the AudioPlayer.

Constructors

Link copied to clipboard
constructor(controller: AudioPlayerController)

Properties

Link copied to clipboard
val state: StateFlow<AudioPlayerState>

State of the audio player.

Functions

Link copied to clipboard
fun changeSpeed(attachment: Attachment)

Change the speed of the audio.

Link copied to clipboard
fun playOrPause(attachment: Attachment)

Play or pause the audio.

Link copied to clipboard
fun reset(attachment: Attachment)

Stop seeking the audio.

Link copied to clipboard
fun seekTo(attachment: Attachment, progress: Float)

Seek to a specific progress in the audio.

Link copied to clipboard
fun startSeek(attachment: Attachment)

Start seeking the audio.

Inherited functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard