PlayerSurface
fun PlayerSurface(player: Player, modifier: Modifier = Modifier, scaleMode: ScaleMode = ScaleMode.Fit, contentAlignment: Alignment = Alignment.Center, defaultAspectRatio: Float? = null, displayDebugView: Boolean = false, surfaceType: SurfaceType = SurfaceType.Surface, surfaceContent: @Composable BoxScope.() -> Unit? = { ExoPlayerSubtitleView(player = player) })
Pillarbox player surface
Parameters
player
The player to render in this SurfaceView.
modifier
The Modifier to be applied to the layout.
scaleMode
The scale mode to use. Only used for video content. Only used when the aspect ratio is strictly positive.
contentAlignment
The "letterboxing" content alignment inside the parent. Only used when the aspect ratio is strictly positive.
defaultAspectRatio
The aspect ratio to use while video is loading or for audio content.
displayDebugView
When true
, displays debug information on top of the surface. Only used when the aspect ratio is strictly positive.
surfaceType
Surface type to use. When playing DRM content, only SurfaceType.Surface is supported.
surfaceContent
The Composable content to display on top of the SurfaceView. By default, render the subtitles. Only used when the aspect ratio is strictly positive.