MacVideoPlayerSurface

@Composable
fun MacVideoPlayerSurface(playerState: MacVideoPlayerState, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, overlay: @Composable () -> Unit = {}, isInFullscreenWindow: Boolean = false)

A Composable function that renders a video player surface for MacOS. Fills the entire canvas area with the video frame while maintaining aspect ratio.

Parameters

playerState

The state object that encapsulates the AVPlayer logic for MacOS.

modifier

An optional Modifier for customizing the layout.

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.

isInFullscreenWindow

Whether this surface is already being displayed in a fullscreen window.