FilmstripImage

fun FilmstripImage(renderer: FrameRenderer, composition: EditComposition, at: Duration, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, contentDescription: String? = null, exportSpec: ExportSpec = ExportSpec(), placeholder: @Composable () -> Unit = { })(source)

One frame of composition, drawn at the size this is laid out to.

A poster frame, a chapter picker's tile or a clip card. The frame is rendered at the height the image is given, so a card that is 96dp tall never decodes more than 96dp worth of pixels, and nothing is asked for until the image has a height. An image with no height, such as one left to wrap content it does not have, shows placeholder and nothing else.

FilmstripImage(
renderer = filmstrip,
composition = composition,
at = 2.seconds,
modifier = Modifier.size(width = 160.dp, height = 90.dp),
placeholder = { Box(Modifier.fillMaxSize().background(Color.DarkGray)) },
)

Parameters

renderer

What renders the frame, usually the Filmstrip itself.

composition

The edit to render from.

at

Where in the composition to render.

modifier

Modifier for the image, and what gives it its size.

contentScale

How the frame is fitted into the image.

contentDescription

What the frame shows, for accessibility.

exportSpec

The export this frame stands in for, which renders it at the HDR grade that export resolves to.

placeholder

What fills the image while the frame has not arrived.