MediaPlayerScaffold

fun MediaPlayerScaffold(snackbarViewModel: SnackbarViewModel, volumeViewModel: VolumeViewModel, playerScreen: @Composable () -> Unit, libraryScreen: @Composable () -> Unit, categoryEntityScreen: @Composable (id: String, name: String) -> Unit, mediaEntityScreen: @Composable () -> Unit, playlistsScreen: @Composable () -> Unit, settingsScreen: @Composable () -> Unit, deepLinkPrefix: String, navController: NavHostController, modifier: Modifier = Modifier, volumeScreen: @Composable () -> Unit = { VolumeScreen(volumeViewModel = volumeViewModel) }, timeText: @Composable () -> Unit = { ResponsiveTimeText() }, navHostState: SwipeDismissableNavHostState = rememberSwipeDismissableNavHostState(), additionalNavRoutes: NavGraphBuilder.() -> Unit = {})

A UI scaffold for a Media Player with a subset of the following screens. Structure is a ViewPager with playerScreen and libraryScreen, with navigation to other screens.

Parameters

modifier

The modifier to be applied to the component

snackbarViewModel

Stateful view model for snackbar

volumeViewModel

Stateful view model for volume screens

playerScreen

the first screen with player controls.

libraryScreen

the long scrolling library top screen.

categoryEntityScreen

screen to show details about a particular category.

mediaEntityScreen

screen to show details about a particular media.

playlistsScreen

screen to show user playlists.

deepLinkPrefix

the app specific prefix for external deeplinks

navController

the media focused navigation controller.

additionalNavRoutes

additional nav routes exposed for extra screens.

navHostState

the SwipeDismissableNavHostState including swipe to dismiss state.

settingsScreen

the settings screen.

timeText

the TimeText() composable.

volumeScreen

the volume screen.