Skip to content

Create

Records a video segment and uploads it as a saved clip.

Functions

createAndSaveClip()

function createAndSaveClip(
  videoElementId,
  cueStart,
  cueEnd,
  breakdown,
  onProgress,
): Promise<void>;

Defined in: src/shared/clips/create.ts:21

Records a segment from a video element, bundles it with its breakdown, and uploads it as a saved clip.

Parameters

Parameter Type Description
videoElementId string The id of the source HTMLVideoElement.
cueStart number Clip start time (seconds).
cueEnd number Clip end time (seconds).
breakdown ClipBreakdown The breakdown payload to store.
onProgress (message, type) => void Progress callback.

Returns

Promise\<void>

Resolves when saved, rejects on error.