ShellPlayer

constructor(isActive: @Composable () -> Boolean, mini: @Composable () -> Unit, onDismiss: () -> Unit? = null, expanded: @Composable (collapse: () -> Unit) -> Unit)(source)

Parameters

isActive

Read while composing, so it can be backed by snapshot state. The player enters when it turns true and sinks away when it turns false.

mini

The collapsed row. It fills a fixed-height pill; tapping the pill outside the app's own buttons expands it, and swiping down when onDismiss is provided dismisses it.

onDismiss

Optional callback invoked once when the person dismisses the collapsed mini player (by swiping it down or triggering the accessibility dismiss action). Dismissal requests the host to stop playback and clear its active player state (for example, stopAndClearMix()); the Toolkit does not stop media or own the host's playback state. When null, downward drags on the collapsed mini player do not dismiss it.

expanded

The full-screen player. It is given the call that collapses it again, for a close or chevron button.


constructor(isActive: @Composable () -> Boolean, mini: @Composable () -> Unit, expanded: @Composable (collapse: () -> Unit) -> Unit)(source)