CurrentMediaItemBox

Functions summary

Unit

A Composable that provides current media item information to its content lambda.

Functions

CurrentMediaItemBox

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

A Composable that provides current media item information to its content lambda.

This function does not render any UI itself. Instead, it manages the state of the androidx.media3.common.MediaItem and its androidx.media3.common.MediaMetadata, exposing them through a CurrentMediaItemState object. This allows for complete control over the layout and appearance of the information display.

Parameters
player: Player?

The Player to get the media item information from.

content: @Composable CurrentMediaItemState.() -> Unit

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