MiniController

Functions summary

Unit
@Composable
@UnstableApi
MiniController(
    player: Player,
    modifier: Modifier,
    bitmapLoader: BitmapLoader?,
    defaultArtwork: Painter?,
    onClick: () -> Unit,
    playerControls: @Composable RowScope.(Player) -> Unit
)

A composable that provides a compact control affordance for the Player.

Functions

@Composable
@UnstableApi
fun MiniController(
    player: Player,
    modifier: Modifier = Modifier,
    bitmapLoader: BitmapLoader? = null,
    defaultArtwork: Painter? = null,
    onClick: () -> Unit = {},
    playerControls: @Composable RowScope.(Player) -> Unit = defaultPlayerControls
): Unit

A composable that provides a compact control affordance for the Player.

The mini controller displays the title and artist of the current media item, as well as its artwork and a progress indicator. It provides playback controls which default to previous, play/pause, and next buttons.

Parameters
player: Player

The Player to control.

modifier: Modifier = Modifier

The Modifier to be applied to the mini controller.

bitmapLoader: BitmapLoader? = null

The BitmapLoader used to load artwork from media metadata. If null, artwork metadata will not be loaded, and only the defaultArtwork (if provided) will be shown.

defaultArtwork: Painter? = null

The default artwork to display if the Player does not have any artwork or if bitmapLoader is null.

onClick: () -> Unit = {}

The action to be performed when the mini controller is clicked.

playerControls: @Composable RowScope.(Player) -> Unit = defaultPlayerControls

A composable that provides the player controls. The default controls are previous, play/pause, and next buttons.