ErrorText

Functions summary

Unit

A Composable that provides error information to its content lambda, acting as a container for ErrorState.

Functions

@UnstableApi
@Composable
fun ErrorText(player: Player?, content: @Composable ErrorState.() -> Unit): Unit

A Composable that provides error information to its content lambda, acting as a container for ErrorState.

This function does not render any UI itself. Instead, it manages the state of the androidx.media3.common.Player.Listener.onPlayerError and exposes it through an ErrorState object. This allows for complete control over the layout and appearance of the error display.

Parameters
player: Player?

The Player to get the error information from.

content: @Composable ErrorState.() -> Unit

The composable content to be displayed, with access to ErrorState.