Skip to content

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.

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.

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()
}

Each registration goes in at the front, so a backend registered later in the block wins over one registered before it.

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()
}