Package-level declarations

Types

Link copied to clipboard

The frames of a timeline strip, held for a window around what is on screen.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The playhead and the length it runs against, for a scrubber to draw.

Link copied to clipboard

The three calls a scrubbing gesture makes, in order.

Link copied to clipboard

How the video rectangle fills the space VideoSurface is given.

Link copied to clipboard

What a preview needs to size itself and to know when it has something worth showing.

Functions

Link copied to clipboard

Collects player's events for as long as this stays in composition.

Link copied to clipboard
fun rememberFilmstripFrame(renderer: FrameRenderer, composition: EditComposition, at: Duration, heightPx: Int?, exportSpec: ExportSpec = ExportSpec()): ImageBitmap?

Remembers one frame of composition, rendered at at with its effects applied, and closes it when this leaves composition.

Link copied to clipboard
fun rememberFilmstripFrames(renderer: FrameRenderer, composition: EditComposition, positions: List<Duration>, heightPx: Int?, maxBytes: Long = FilmstripFramesDefaults.MaxBytes, overscan: Int = FilmstripFramesDefaults.Overscan, exportSpec: ExportSpec = ExportSpec()): FilmstripFrames

Remembers the frames of a timeline strip over composition, and closes them when this leaves composition.

Link copied to clipboard
fun rememberFilmstripPlayer(previews: PreviewFactory, composition: EditComposition, config: PlayerConfig = PlayerConfig()): VideoPlayer

Remembers a player over composition and closes it when this leaves composition.

Link copied to clipboard
fun rememberPlayheadState(player: VideoPlayer, tick: Duration = PlayheadDefaults.Tick): PlayheadState

Follows player's playhead and the length of what it is playing.

Link copied to clipboard

Remembers the scrub protocol for player.

fun rememberScrubState(onSeek: (Duration) -> Unit, onBegin: () -> Unit = {}, onEnd: () -> Unit = {}): ScrubState

Remembers the scrub protocol for a transport the host drives itself.

Link copied to clipboard

Remembers a player from factory and closes it when this leaves composition.

Link copied to clipboard

Tracks player's output size and whether its surface has pixels yet.

Link copied to clipboard

Constrains this layout to the aspect the composition outputs.

Link copied to clipboard
fun videoContentRect(output: Size, available: Size, contentScale: VideoContentScale): Rect

The rectangle output fills inside available, for contentScale.

fun videoContentRect(outputAspect: Float, available: Size, contentScale: VideoContentScale): Rect

The rectangle a frame of outputAspect fills inside available, for contentScale.

Link copied to clipboard
actual fun VideoSurface(player: VideoPlayer, modifier: Modifier, contentScale: VideoContentScale)

Android renders into a SurfaceView.

expect fun VideoSurface(player: VideoPlayer, modifier: Modifier = Modifier, contentScale: VideoContentScale = VideoContentScale.Fit)

Renders player's video output, and nothing else.

actual fun VideoSurface(player: VideoPlayer, modifier: Modifier, contentScale: VideoContentScale)

iOS renders into a UIView whose backing layer is an AVPlayerLayer.

actual fun VideoSurface(player: VideoPlayer, modifier: Modifier, contentScale: VideoContentScale)

Desktop draws the readback, the same way the browser does.

actual fun VideoSurface(player: VideoPlayer, modifier: Modifier, contentScale: VideoContentScale)

The browser draws the composite itself, so there is no native view to attach.