VideoTrackRenderer

fun VideoTrackRenderer(videoTrack: VideoTrack?, modifier: Modifier = Modifier, keepScreenOn: Boolean = true, mirror: Boolean = false, zOrderMediaOverlay: Boolean = false, zOrderOnTop: Boolean = false, onFirstFrame: () -> Unit = { }, onFrameResolutionChange: (FrameResolution) -> Unit = { }, scalingTypeMatchOrientation: RendererCommon.ScalingType = RendererCommon.ScalingType.SCALE_ASPECT_BALANCED, scalingTypeMismatchOrientation: RendererCommon.ScalingType = scalingTypeMatchOrientation)

Composes SurfaceViewRenderer and renders a VideoTrack.

Please note that changing zOrderMediaOverlay or zOrderOnTop after this function was called has no effect.

Parameters

videoTrack

an instance of video track or null

modifier

optional Modifier to be applied to the video

keepScreenOn

controls whether the screen should remain on

mirror

defines if the video should rendered mirrored

zOrderMediaOverlay

control whether the video is rendered on top of another video

zOrderOnTop

control whether the video is rendered on top of its window. This overrides zOrderMediaOverlay if set

onFirstFrame

called when the first frame has been rendered

onFrameResolutionChange

called when frame resolution or rotation change

scalingTypeMatchOrientation

controls how the video scales when the video and layout orientations match

scalingTypeMismatchOrientation

controls how the video scales when the video and layout orientations do not match