A2uiAudioPlayerRenderer

fun interface A2uiAudioPlayerRenderer


An abstraction of an asynchronous audio player which should be implemented using the application's media loading library (such as Media3/ExoPlayer), used for rendering audio playback controls for A2uiBasicCatalogV1.AudioPlayer.

Summary

Public functions

Unit
@Composable
AudioPlayer(
    url: String,
    contentDescription: String?,
    modifier: Modifier,
    onError: (Throwable?) -> Unit
)

Displays an audio player from a URL.

Public functions

AudioPlayer

@Composable
fun AudioPlayer(
    url: String,
    contentDescription: String?,
    modifier: Modifier,
    onError: (Throwable?) -> Unit
): Unit

Displays an audio player from a URL.

Parameters
url: String

The URL of the audio to load and play.

contentDescription: String?

Accessibility text for the audio player.

modifier: Modifier

The modifier to be applied to the layout.

onError: (Throwable?) -> Unit

The callback to be invoked when the audio fails to load or play.