mcut
@mcut/timeline

snapClip

Generated TypeScript API reference for the public mcut SDK.

mcut SDK


mcut SDK / timeline/src / snapClip

Function: snapClip()

function snapClip(
   startMs,
   durationMs,
   targets,
   thresholdMs,
   options?): SnapClipResult;

Defined in: packages/timeline/src/snap.ts:126

Snap a clip by either edge: whichever of start/end is closest to a target wins, and the clip shifts so that edge lands exactly on it.

Parameters

startMs

number

durationMs

number

targets

readonly SnapTarget[]

thresholdMs

number

options?

SnapOptions = {}

Returns

SnapClipResult

On this page