VideoPlayerSurface

@UnstableApi
@Composable
fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, surfaceType: SurfaceType = SurfaceType.TextureView, overlay: @Composable () -> Unit = {})
@UnstableApi
@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)
@Composable
expect fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, overlay: @Composable () -> Unit = {})

Renders a video player surface that displays and controls video playback.

Parameters

playerState

The state of the video player, which manages playback controls, video position, volume, and other related properties.

modifier

The modifier to be applied to the video player surface for layout and styling adjustments.

contentScale

Controls how the video content should be scaled inside the surface. This affects how the video is displayed when its dimensions don't match the surface dimensions.

overlay

Optional composable content to be displayed on top of the video surface. This can be used to add custom controls, information, or any UI elements.

@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)
@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)

Composable function for rendering a video player surface.

The function delegates the rendering logic to specific platform-specific implementations based on the type of the delegate within the provided VideoPlayerState.

Parameters

playerState

The current state of the video player, encapsulating playback state and platform-specific implementation details.

modifier

A Modifier for styling or adjusting the layout of the video player surface.

contentScale

Controls how the video content should be scaled inside the surface. This affects how the video is displayed when its dimensions don't match the surface dimensions.

overlay

Optional composable content to be displayed on top of the video surface. This can be used to add custom controls, information, or any UI elements.

@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)