# ErrorText

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/text/ErrorText.composable#ErrorText(androidx.media3.common.Player,kotlin.Function1)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/ErrorState.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` A Composable that provides error information to its `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/text/package-summary#ErrorText(androidx.media3.common.Player,kotlin.Function1)` lambda, acting as a container for `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/ErrorState`. |

## Functions

### ErrorText

Artifact: [androidx.media3:media3-ui-compose](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/ui/compose/text/ErrorText.kt+function:ErrorText)

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

A Composable that provides error information to its `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/text/package-summary#ErrorText(androidx.media3.common.Player,kotlin.Function1)` lambda, acting as a container for `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/ErrorState`.

This function does not render any UI itself. Instead, it manages the state of the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlayerError(androidx.media3.common.PlaybackException)` and exposes it through an `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/ErrorState` object. This allows for complete control over the layout and appearance of the error display.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player` to get the error information from. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/ErrorState.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The composable content to be displayed, with access to `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/ErrorState`. |