setComposition

Loads a composition, or replaces the current one.

Implementations must classify the diff against what is already loaded rather than rebuilding unconditionally. A structural change forces a decoder reinitialisation costing tens to low hundreds of milliseconds: clips added, removed, reordered, or a trim that changes duration. A change confined to effect parameters must not, and instead updates the live parameter objects the pipeline already holds and redraws. Setting an equal composition must do nothing at all.

Return

a handle that cancels the request.

Parameters

request

What to load, and how.

callback

Receives the outcome exactly once.