Setup
Everything in filmstrip goes through one Filmstrip instance. Create it once, keep it for as long as your app or
your DI graph lives, and pass it to whatever needs to probe, plan, export or preview.
Register everything
Section titled “Register everything”With the filmstrip artifact, allBackends() registers this target’s export backend, the player and the built-in
effects.
val filmstrip = Filmstrip { allBackends() }An instance built with an empty block can only probe, and only on Android and Apple. The same probe returns
FilmstripError.BackendMissing on the JVM and in a browser. Anything else reports BackendMissing too, naming the
artifact to add.
Register only what you need
Section titled “Register only what you need”transformBackend() registers the export backend and the built-in effects without the player.
val filmstrip = Filmstrip { transformBackend() }playerBackend() alone gives you preview, with no export.
val filmstrip = Filmstrip { playerBackend() }Without the filmstrip bundle, depend on filmstrip-player and the engine artifact for each target, then register
the engine by name.
val filmstrip = Filmstrip { media3Backend() playerBackend() }val filmstrip = Filmstrip { avFoundationBackend() playerBackend() }val filmstrip = Filmstrip { ffmpegBackend( FfmpegConfig( executablePath = "/opt/homebrew/bin/ffmpeg", probePath = "/opt/homebrew/bin/ffprobe", ), ) playerBackend() }FfmpegConfig is optional. Without it filmstrip reads FILMSTRIP_FFMPEG and FILMSTRIP_FFPROBE, then searches
PATH.
val filmstrip = Filmstrip { webCodecsBackend() playerBackend() }Each registration goes in at the front, so a backend registered later in the block wins over one registered before it.
Android context
Section titled “Android context”filmstrip picks up the application context through App Startup. If your app turns App Startup off, or a test runs outside it, pass a context yourself.
val filmstrip = Filmstrip(context) { allBackends() }