VideoStageScope
What content drawn over a VideoStage is given.
A BoxScope, so an overlay places itself with align and matchParentSize the way it would in any box. frame is the letterbox the stage already computed, which tells an overlay where the picture is.
A Row or a Column opened inside the content shadows this scope, so chrome that reads frame or aspect from inside one takes them as parameters.
VideoStage(player = player, outputAspect = outputAspect) {
CropOverlay(rect = rect, onRectChange = { rect = it })
Text(
text = "${(aspect * 100).roundToInt() / 100f}",
modifier = Modifier.align(Alignment.BottomEnd),
)
}Content copied to clipboard
Functions
Link copied to clipboard
fun VideoStageScope.CropOverlay(rect: NormalizedRect, onRectChange: (NormalizedRect) -> Unit, modifier: Modifier = Modifier, constraint: CropConstraint = CropOverlayDefaults.Constraint, colors: CropColors = CropOverlayDefaults.Palette, handleLength: Dp = CropOverlayDefaults.HandleLength, touchSize: Dp = CropOverlayDefaults.TouchSize, showGrid: Boolean = true)
A drag-to-crop rectangle over the video a dev.jordond.filmstrip.compose.ui.VideoStage is showing.
Link copied to clipboard
Link copied to clipboard
fun VideoStageScope.OverlayHandle(placement: OverlayPlacement, onFrameAnchorChange: (Anchor) -> Unit, output: Size, modifier: Modifier = Modifier, colors: OverlayHandleColors = OverlayHandleDefaults.Palette, handleLength: Dp = OverlayHandleDefaults.HandleLength, enabled: Boolean = true, content: @Composable () -> Unit = { })
A draggable box over the video a VideoStage is showing, drawn where the overlay it stands for really lands.