Interface

ActiveLayerResult

Active timeline layer lookup result. Results include every active clip matched by the requested selectors plus convenience `primary` entries for apps that only need the first match in each layer. Each `ActiveClip` includes mapped source time and source range data for preview and playback synchronization.

Signature

Type Definition
Interface ActiveLayerResult

Type parameters

NameConstraintDefaultDescription
LayerNamestringstringString literal names from the `layers` option, such as `"visuals" | "audio"`.
TrackKindNonestringApp-defined track kind values carried by returned tracks.

Properties

NameSignatureDescription
allall: ActiveClip<TrackKind>[]Unique clips matched by at least one requested layer, in stable track order.
byTrackbyTrack: Map<string, ActiveClip<TrackKind>[]>Matched active clips grouped by containing track id.
firstContentTime?firstContentTime?: RationalTimeEarliest timeline start among clips that match any requested layer.
hasActiveClipshasActiveClips: booleanWhether any requested layer matched active clips.
layerslayers: Record<LayerName, ActiveClip<TrackKind>[]>Active clips for each named layer, preserving stable track order.
primaryprimary: Partial<Record<LayerName, ActiveClip<TrackKind>>>First active clip in each layer, as a convenience selection only.
timetime: RationalTimeTimeline time used for the lookup.

Examples

ts Example
const activeLayers = engine.getActiveLayers({
layers: {
visuals: { trackKind: 'visual' },
audio: { trackKind: 'audio' },
},
});
const visualClip = activeLayers.primary.visuals?.clip;
const audioClips = activeLayers.layers.audio;