preview

abstract fun preview(composition: EditComposition, config: PlayerConfig = PlayerConfig()): VideoPlayer(source)

Opens a player over the same composition value that an export takes.

Returns immediately. The composition loads asynchronously and progress is observable on the player's own state. When no preview backend is registered, or a browser preview has no webCodecsBackend() to read its source with, the returned player reports PlaybackError.BackendMissing rather than throwing.

Return

A player, which the caller owns and must close.

Parameters

composition

The edit to play.

config

How the player should behave.