Video

data class Video(val modifier: Modifier = Modifier, val aspectRatio: SkapaAspectRatio? = SkapaAspectRatio.Ratio1by1, val contentDescription: String?, val playButtonParams: VideoPlayerButtonParams.PlayButtonParams, val transcriptionParams: VideoPlayerButtonParams.TranscriptionParams? = null, val onBackgroundClick: () -> Unit? = null, val controlsContentPadding: PaddingValues = PaddingValues.Zero, val player: @Composable () -> Unit) : CompactMediaContainer(source)

Video content for the media container.

Constructors

Link copied to clipboard
constructor(modifier: Modifier = Modifier, aspectRatio: SkapaAspectRatio? = SkapaAspectRatio.Ratio1by1, contentDescription: String?, playButtonParams: VideoPlayerButtonParams.PlayButtonParams, transcriptionParams: VideoPlayerButtonParams.TranscriptionParams? = null, onBackgroundClick: () -> Unit? = null, controlsContentPadding: PaddingValues = PaddingValues.Zero, player: @Composable () -> Unit)

Properties

Link copied to clipboard

The aspect ratio of the video player. Optional, default is SkapaAspectRatio.Ratio1by1 but can be set as null for more precise control through modifier.

Link copied to clipboard

The content description for the video container. Of type String.

Link copied to clipboard

Optional padding applied to the controls overlay area. Use this to avoid overlap with system UI in edge-to-edge layouts. Defaults to no padding.

Link copied to clipboard

The modifier to be applied to the video player.

Link copied to clipboard

Lambda to be invoked when the background is clicked. This should be used to toggle play / pause state.

Link copied to clipboard

Represents the parameters of the play / pause button.

Link copied to clipboard
val player: @Composable () -> Unit

The composable lambda that will be used to draw the video player.

Link copied to clipboard

Represents the parameters of the transcription button.