Audio

actual class Audio : AudioBuilder

Play audio from a url (String).

Example:

val audioUrl = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3"
val audio = Audio(audioUrl, true) // AutoPlay is marked "true"
actual class Audio : AudioBuilder

Play audio from a url (String).

Example:

val audioUrl = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3"
val audio = Audio(audioUrl, true) // AutoPlay is marked "true"
expect class Audio

Play audio from a url (String).

Example:

val audioUrl = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3"
val audio = Audio(audioUrl, true) // AutoPlay is marked "true"
actual class Audio : AudioBuilder

Play audio from a url (String).

Example:

val audioUrl = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3"
val audio = Audio(audioUrl, true) // AutoPlay is marked "true"
actual class Audio : AudioBuilder

Play audio from a url (String).

Example:

val audioUrl = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3"
val audio = Audio(audioUrl, true) // AutoPlay is marked "true"
actual class Audio : AudioBuilder

Play audio from a url (String).

Example:

val audioUrl = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3"
val audio = Audio(audioUrl, true) // AutoPlay is marked "true"

Constructors

Link copied to clipboard
actual constructor()
actual constructor(resource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor(context: Any?, composeResource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor()
actual constructor(resource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor(context: Any?, composeResource: String, autoPlay: Boolean)

Play audio from a url or path (String).

expect constructor()
expect constructor(resource: String, autoPlay: Boolean = false)

Play audio from a url or path (String).

expect constructor(context: Any?, composeResource: String, autoPlay: Boolean = false)

Play audio from a url or path (String).

actual constructor()
actual constructor(resource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor(context: Any?, composeResource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor()
actual constructor(resource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor(context: Any?, composeResource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor()
actual constructor(resource: String, autoPlay: Boolean)

Play audio from a url or path (String).

actual constructor(context: Any?, composeResource: String, autoPlay: Boolean)

Play audio from a url or path (String).

Properties

Link copied to clipboard
actual open override val audioState: StateFlow<AudioState>

common sealed class that provides the state of Audio after initialization

actual open override val audioState: StateFlow<AudioState>

common sealed class that provides the state of Audio after initialization

expect val audioState: StateFlow<AudioState>

Provides the state of Audio after initialization

actual open override val audioState: StateFlow<AudioState>

common sealed class that provides the state of Audio after initialization

actual open override val audioState: StateFlow<AudioState>

common sealed class that provides the state of Audio after initialization

actual open override val audioState: StateFlow<AudioState>

common sealed class that provides the state of Audio after initialization

Link copied to clipboard
actual var autoPlay: Boolean

If true, Audio runs play immediately after reaching AudioState.READY

actual var autoPlay: Boolean

If true, Audio runs play immediately after reaching AudioState.READY

expect var autoPlay: Boolean

If true, Audio runs play immediately after reaching AudioState.READY

actual var autoPlay: Boolean

If true, Audio runs play immediately after reaching AudioState.READY

actual var autoPlay: Boolean

If true, Audio runs play immediately after reaching AudioState.READY

actual var autoPlay: Boolean

If true, Audio runs play immediately after reaching AudioState.READY

Link copied to clipboard
actual var resource: String

A url link as a string:

actual var resource: String

A url link as a string:

expect var resource: String

A url link as a string:

actual var resource: String

A url link as a string:

actual var resource: String

A url link as a string:

actual var resource: String

A url link as a string:

Functions

Link copied to clipboard
actual open override fun load(context: Any?)

Used to load an Audio file when AudioState.NONE.

actual open override fun load(context: Any?)

When overridden, used to load an Audio file when AudioState.NONE.

expect fun load(context: Any? = null)

Used to load an Audio file when AudioState.NONE.

actual open override fun load(context: Any?)

When overridden, used to load an Audio file when AudioState.NONE.

actual open override fun load(context: Any?)

When overridden, used to load an Audio file when AudioState.NONE.

actual open override fun load(context: Any?)

When overridden, used to load an Audio file when AudioState.NONE.

Link copied to clipboard
actual open override fun pause()

When overridden, used when Audio is AudioState.PLAYING to pause the sound to be continued later.

actual open override fun pause()

When overridden, used when Audio is AudioState.PLAYING to pause the sound to be continued later.

expect fun pause()

Used when Audio is AudioState.PLAYING to pause the sound to be continued later.

actual open override fun pause()

When overridden, used when Audio is AudioState.PLAYING to pause the sound to be continued later.

actual open override fun pause()

When overridden, used when Audio is AudioState.PLAYING to pause the sound to be continued later.

actual open override fun pause()

When overridden, used when Audio is AudioState.PLAYING to pause the sound to be continued later.

Link copied to clipboard
actual open override fun play()

When overridden, used after Audio is initialized with AudioState.READY to play the sound immediately.

actual open override fun play()

When overridden, used after Audio is initialized with AudioState.READY to play the sound immediately.

expect fun play()

Used after Audio is initialized with AudioState.READY to play the sound immediately.

actual open override fun play()

When overridden, used after Audio is initialized with AudioState.READY to play the sound immediately.

actual open override fun play()

When overridden, used after Audio is initialized with AudioState.READY to play the sound immediately.

actual open override fun play()

When overridden, used after Audio is initialized with AudioState.READY to play the sound immediately.

Link copied to clipboard
actual open override fun release()

When overridden, used when done to clear the Audio object from memory.

actual open override fun release()

When overridden, used when done to clear the Audio object from memory.

expect fun release()

Used when done to clear the Audio object from memory.

actual open override fun release()

When overridden, used when done to clear the Audio object from memory.

actual open override fun release()

When overridden, used when done to clear the Audio object from memory.

actual open override fun release()

When overridden, used when done to clear the Audio object from memory.

Link copied to clipboard
actual open override fun stop()

When overridden, used to reset the Audio without reloading from the sound file.

actual open override fun stop()

When overridden, used to reset the Audio without reloading from the sound file.

expect fun stop()

Used to reset the Audio without reloading from the sound file.

actual open override fun stop()

When overridden, used to reset the Audio without reloading from the sound file.

actual open override fun stop()

When overridden, used to reset the Audio without reloading from the sound file.

actual open override fun stop()

When overridden, used to reset the Audio without reloading from the sound file.