# CurrentMediaItemBox

## 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/CurrentMediaItemBox.composable#CurrentMediaItemBox(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/CurrentMediaItemState.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` A Composable that provides current media item information to its `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/text/package-summary#CurrentMediaItemBox(androidx.media3.common.Player,kotlin.Function1)` lambda. |

## Functions

### CurrentMediaItemBox

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/CurrentMediaItemBox.kt+function:CurrentMediaItemBox)

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

A Composable that provides current media item information to its `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/text/package-summary#CurrentMediaItemBox(androidx.media3.common.Player,kotlin.Function1)` lambda.

This function does not render any UI itself. Instead, it manages the state of the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` and its `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata`, exposing them through a `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/CurrentMediaItemState` object. This allows for complete control over the layout and appearance of the information 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 media item information from. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/CurrentMediaItemState.() -> 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/CurrentMediaItemState`. |