Package-level declarations

Types

Link copied to clipboard
typealias ControlButtons = @Composable RowScope.(playerUiController: PlayerUiController, playerUiState: PlayerUiState) -> Unit
Link copied to clipboard
typealias MediaDisplay = @Composable ColumnScope.(playerUiState: PlayerUiState) -> Unit
Link copied to clipboard
typealias PlayerBackground = @Composable BoxScope.(playerUiState: PlayerUiState) -> Unit
Link copied to clipboard
typealias SettingsButtons = @Composable RowScope.(playerUiState: PlayerUiState) -> Unit

Functions

Link copied to clipboard
fun DefaultMediaInfoDisplay(playerUiState: PlayerUiState, modifier: Modifier = Modifier)

Default MediaDisplay implementation for PlayerScreen including player status.

Link copied to clipboard

Default ControlButtons implementation for PlayerScreen.

Link copied to clipboard
fun PlayerScreen(mediaDisplay: @Composable ColumnScope.() -> Unit, controlButtons: @Composable RowScope.() -> Unit, buttons: @Composable RowScope.() -> Unit, modifier: Modifier = Modifier, background: @Composable BoxScope.() -> Unit = {})

Media Player screen that offers slots for media display, control buttons, buttons and background.

fun PlayerScreen(playerViewModel: PlayerViewModel, volumeViewModel: VolumeViewModel, modifier: Modifier = Modifier, mediaDisplay: MediaDisplay = { playerUiState -> DefaultMediaInfoDisplay(playerUiState) }, controlButtons: ControlButtons = { playerUiController, playerUiState -> DefaultPlayerScreenControlButtons(playerUiController, playerUiState) }, buttons: SettingsButtons = {}, background: PlayerBackground = {}, focusRequester: FocusRequester = rememberActiveFocusRequester())

Stateful version of PlayerScreen that provides default implementation for media display and control buttons. This version listens to PlayerUiStates emitted from PlayerViewModel to update the screen.