PlayerFrame
fun PlayerFrame(player: Player?, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, surfaceType: SurfaceType = SurfaceType.Surface, displayDebugView: Boolean = false, presentationState: PresentationState = rememberPresentationState(player = player, keepContentOnReset = false), surface: @Composable BoxScope.() -> Unit? = null, subtitle: @Composable SubtitleBoxScope.() -> Unit = {
PlayerSubtitle(
modifier = Modifier,
player = player,
)
}, shutter: @Composable BoxScope.() -> Unit = {
Box(
Modifier
.fillMaxSize()
.background(Color.Black)
)
}, overlay: @Composable BoxScope.() -> Unit = {})(source)
Provides a surface for a Player.
Parameters
player
The Player to be displayed.
modifier
The Modifier to be applied to the surface.
contentScale
The ContentScale to be applied to the surface.
surfaceType
The type of surface to be used.
displayDebugView
Whether to display a debug view.
presentationState
The PresentationState to be used.
surface
A composable function that draws on top of the surface. It may be displayed outside the bounds.
subtitle
A composable function that draws the subtitle. Subtitle can only SubtitleContentScale.Fill or SubtitleContentScale.Fill.
shutter
A composable function that draws when PresentationState.coverSurface is true.