mcut
@mcut/timeline

getActiveLayout

Generated TypeScript API reference for the public mcut SDK.

mcut SDK


mcut SDK / timeline/src / getActiveLayout

Function: getActiveLayout()

function getActiveLayout(
   project,
   element,
   timelineMs):
  | {
  id: string;
  name: string;
  slots: object[];
}
  | null;

Defined in: packages/timeline/src/multicam.ts:30

The layout active at element-local localMs (null if id is dangling).

Parameters

project

assets

Record<string, { durationMs?: number; hash?: string; height?: number; id: `a-${string}`; kind: "video" | "audio" | "image"; mimeType?: string; name?: string; nativePreview?: boolean; src: string; width?: number; }> = ...

fps

number = ...

height

number = ...

id

string = ...

layouts

object[] = ...

Multicam layout templates this project references. See layouts.ts.

markers

object[] = ...

Timeline markers, sorted by timeMs (the commands keep them sorted).

name

string = ...

presets

object[] = ...

Named inspector value bundles (style presets). See presets.ts.

tracks

object[] = ...

Render order: index 0 is painted first (bottom); last is topmost.

version

1 = ...

Project format version (see migrations.ts). parseProject migrates older documents before validating; the default covers in-memory creation.

width

number = ...

element

angles

object[] = ...

angleTransition?

{ durationMs: number; type: string; } = ...

Uniform transition blended at EVERY angle cut (omit = hard jump cuts). One setting standardizes the whole switch list; the window is centered on each cut and clamped so neighboring windows never overlap.

angleTransition.durationMs

number = ...

Total blend window, centered on the cut.

angleTransition.type

string = transitionTypeSchema

audioSource?

string = ...

Key of the source whose audio plays (omit to mute all sources).

blendMode?

| "color" | "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "luminosity" = ...

Compositing blend mode against the layers below. Absent = normal.

durationMs

number = ...

effects?

Effect[] = ...

Ordered effect stack, compiled to a canvas filter. See effects.ts.

fadeInMs?

number = ...

Audio fade-in length from the clip's start (ms). Absent = none.

fadeOutMs?

number = ...

Audio fade-out length before the clip's end (ms). Absent = none.

groupId?

`g-${string}` = ...

Elements sharing a groupId are one editable timeline item made from multiple clips. This is separate from linkId, which remains audio/link-pair semantics.

id

`e-${string}` = elementIdSchema

keyframes?

Partial<Record< | "blur" | "rotation" | "position.x" | "position.y" | "scale.x" | "scale.y" | "opacity" | "volume" | "letterSpacing", object[]>> = ...

Armed fixed-effect properties (Premiere stopwatch on): per-property keyframe tracks, sorted and unique by element-local timeMs.

linkId?

string = ...

Elements sharing a linkId are linked (e.g. video + its detached audio): UIs select and move them together. The engine stores the linkage; it does not enforce cascading edits.

motionBlur?

{ enabled: boolean; shutterAngle: number; } = ...

Sub-frame motion blur on keyframed transform motion. Absent = off. See effects.ts.

motionBlur.enabled

boolean = ...

motionBlur.shutterAngle

number = ...

Shutter angle in degrees: 360° exposes the full frame interval, 180° (the default) is the film-camera look — half the interval.

muted

boolean = ...

opacity

number = ...

sources

object[] = ...

startMs

number = ...

timeMap?

object[] = ...

Time remap (speed) for the whole multicam; see speed.ts.

transform

{ rotation: number; scaleX: number; scaleY: number; x: number; y: number; } = transformSchema

transform.rotation

number = ...

transform.scaleX

number = ...

transform.scaleY

number = ...

transform.x

number = ...

transform.y

number = ...

transition?

{ durationMs: number; type: string; } = ...

Transition INTO the next exactly-adjacent clip on the same track; this element is the left side of the pair. See transitions.ts.

transition.durationMs

number = ...

Total blend window, centered on the cut.

transition.type

string = transitionTypeSchema

type

"multicam" = ...

volume

number = ...

timelineMs

number

Returns

Type Literal

{
  id: string;
  name: string;
  slots: object[];
}

id

id: string;

name

name: string;

slots

slots: object[];

Paint order: first slot is painted first (bottom).


null

On this page