Sound Player
object SoundPlayer
A sound player that plays audio from a given URL.
This is a platform-agnostic implementation for the Kotlin Multiplatform SDK. Platform-specific implementations are provided via expect/actual.
Example usage:
SoundPlayer.play(SoundPlayerOptions(soundUrl = "https://example.com/sound.mp3"))Content copied to clipboard
Functions
Link copied to clipboard
Attaches listeners for playback events.
Link copied to clipboard
Plays the sound from the provided options.
Link copied to clipboard
Preloads the sound for faster playback.
Link copied to clipboard
Stops and reinitializes the audio player.