Creates an empty timeline with default playback settings.
Adds an existing layer instance to the timeline.
Layer instance to add.
Optionalindex: numberOptional insertion index in the layer order.
A promise that resolves after the layer has been initialized.
Imports a media file into the project library.
Source file to add.
A promise that resolves to the created media ID, or null if the import fails before an ID can be returned.
Reflows clips on every layer to resolve overlaps or spacing issues according to each layer's layout rules.
true if any layer changed its clip layout; otherwise false.
Aligns a time value to the nearest valid frame boundary.
Source time in seconds.
Rounding strategy used during alignment.
The aligned time in seconds.
Removes all custom metadata stored on the timeline.
Nothing.
Creates, inserts, and initializes a new layer.
Optionaloptions: { index?: number }Optional insertion options.
The created layer.
Stops the render loop, destroys every layer, and removes all timeline content.
Nothing.
Cancels in-progress processing work for every clip on the timeline.
Nothing.
Returns a copy of all custom metadata stored on the timeline.
A copied metadata map, or undefined if no custom data has been stored.
Returns a previously stored timeline metadata value.
Metadata key to look up.
The stored value, or undefined if the key is not present.
Returns the end time of the right-most visible content on the timeline.
The fit duration in seconds.
Returns the timeline frame rate.
Frames per second used for playback and time alignment.
Returns the duration of a single timeline frame.
The frame duration in seconds.
Converts a time value into a frame number using the current timeline FPS.
Source time in seconds.
Rounding strategy used during alignment.
The aligned frame number.
Converts multiple time values into frame numbers using the current timeline FPS.
Source times in seconds.
The matching frame numbers in the same order.
Indicates whether any clip on the timeline is still processing media or effects.
true if at least one clip is still processing; otherwise false.
Returns the layer that currently owns the specified clip.
Clip ID to look up.
The layer containing the clip, or undefined if the clip cannot be found.
Returns a layer by its ID.
Layer ID to look up.
The matching layer, or undefined if not found.
Returns the current order index of a layer in the timeline stack.
Layer ID to look up.
The zero-based layer index, or -1 if the layer is not present.
Returns the current master timeline volume.
The timeline volume multiplier.
Indicates whether the timeline has a stored metadata value for the provided key.
Metadata key to test.
true if the key exists; otherwise false.
Initializes all layers and starts the render loop.
A promise that resolves after timeline initialization completes.
Replaces the current timeline state with serialized data and reinitializes rendering.
Serialized timeline payload.
A promise that resolves after the timeline has been reloaded.
Moves a clip from its current layer to another layer.
Clip ID to move.
Destination layer ID.
A promise that resolves after the move has completed.
Pauses playback without changing the current playhead position.
Nothing.
Starts timeline playback.
A promise that resolves after all layers have handled playback start.
Runs post-render hooks for every layer after a frame has been presented.
Nothing.
Removes a layer and all of its clips.
Layer ID to remove.
true if the layer existed and was removed; otherwise false.
Advances the timeline and renders one frame.
Optionaloptions: TimelineRenderOptionsOptional render-loop behavior overrides.
A promise that resolves after the frame has been processed.
Clears the current timeline state, destroys existing layers, and restarts the render loop with default playback settings.
Nothing.
Moves the playhead to a specific timeline time.
Target time, in seconds.
Nothing.
Serializes the timeline and all of its layers.
The serialized timeline payload.
Replaces all custom timeline metadata with a copy of the provided map.
Metadata entries to store.
Nothing.
Stores an arbitrary metadata entry on the timeline instance.
Metadata key.
Metadata value.
Whether an existing value for the same key may be replaced.
true if the value was stored; otherwise false when overwrite is disabled and the key already exists.
Sets the timeline frame rate used for playback and frame alignment.
Frames per second to use.
Nothing.
Assigns a subtitles asset to clips on the timeline.
Subtitles asset ID to apply.
Global subtitles offset in seconds.
OptionalclipIds: string[]Optional clip ID subset to update. When omitted, all clips are updated.
Nothing.
Sets the master timeline volume used by audio and video clips during playback.
Timeline volume multiplier.
Nothing.
Stops playback and resets the playhead to the start of the timeline.
Nothing.
Stops the animation-frame driven render loop without destroying timeline state.
Nothing.
StaticdeserializeCreates a timeline instance from serialized data.
Serialized timeline payload.
The deserialized timeline.
Owns the ordered set of layers and drives playback, seeking, and frame updates across the project.