DefaultSoundPlayer

A default implementation of SoundPlayer

Parameters

source

the MediaSource.Local on which the media is found

A default implementation of SoundPlayer

Parameters

source

the MediaSource.Local on which the media is found

A default implementation of SoundPlayer

Parameters

source

the MediaSource.Local on which the media is found

configuration

A default implementation of SoundPlayer

Parameters

source

the MediaSource.Local on which the media is found

configuration

A default implementation of SoundPlayer for the JS family, backed by an HTMLAudioElement.

Parameters

source

the MediaSource.Local on which the media is found

Constructors

Link copied to clipboard
constructor(source: MediaSource.Local, context: Context)
actual constructor(source: MediaSource.Local)

Creates SoundPlayer with the application context

expect constructor(source: MediaSource.Local)
constructor(source: MediaSource.Local, configuration: DefaultSoundPlayer.Configuration)
actual constructor(source: MediaSource.Local)

Creates SoundPlayer with default configuration

constructor(source: MediaSource.Local, configuration: DefaultSoundPlayer.Configuration)
actual constructor(source: MediaSource.Local)

Creates SoundPlayer with default configuration

actual constructor(source: MediaSource.Local)

Types

Link copied to clipboard
data class Configuration(val restartIfRouteChanged: Boolean = false)
data class Configuration(val restartIfRouteChanged: Boolean = false)
Link copied to clipboard
inner class ForegroundSoundPlayer(startAutomatically: Boolean = true) : SoundPlayer
inner class ForegroundSoundPlayer(startAutomatically: Boolean = true) : SoundPlayer
Link copied to clipboard
sealed interface State
sealed interface State

Functions

Link copied to clipboard
actual open override fun close()

Closes the sound player

expect open override fun close()

Closes the sound player

actual open override fun close()

Closes the sound player

actual open override fun close()

Closes the sound player

actual open override fun close()

Closes the sound player

Link copied to clipboard
actual open override fun play()

Plays the sound

expect open override fun play()

Plays the sound

actual open override fun play()

Plays the sound

actual open override fun play()

Plays the sound

actual open override fun play()

Plays the sound