ContentFrame
Functions summary
Unit |
@UnstableApiA container for displaying media content from a |
Functions
ContentFrame
@UnstableApi
@Composable
fun ContentFrame(
player: Player?,
modifier: Modifier = Modifier,
surfaceType: @SurfaceType Int = SURFACE_TYPE_SURFACE_VIEW,
contentScale: ContentScale = ContentScale.Fit,
keepContentOnReset: Boolean = false,
shutter: @Composable () -> Unit = { Box(Modifier.fillMaxSize().background(Color.Black)) }
): Unit
A container for displaying media content from a Player.
This composable handles the underlying PlayerSurface for video playback, resizing the video based on the provided ContentScale, and displaying a shutter according to the PresentationState based off the Player.
| Parameters | |
|---|---|
player: Player? |
The attached |
modifier: Modifier = Modifier |
The |
surfaceType: @SurfaceType Int = SURFACE_TYPE_SURFACE_VIEW |
The type of surface to use for video playback. Can be either |
contentScale: ContentScale = ContentScale.Fit |
The |
keepContentOnReset: Boolean = false |
If |
shutter: @Composable () -> Unit = { Box(Modifier.fillMaxSize().background(Color.Black)) } |
A composable that is displayed when the video surface needs to be covered. By default, this is a black background. |