Skip to content

Intermact API Reference / @intermact/react / recordCanvasVideo

Function: recordCanvasVideo()

recordCanvasVideo(canvas, player, options?): Promise<Blob>

Defined in: react/src/export/recordCanvas.ts:55

Record a canvas while a Player plays from the start, resolving with the encoded video Blob. Seeks to 0, plays in real time, and stops after duration seconds, then resets the player (seek 0 + pause). Browser only (requires MediaRecorder + captureStream); the MIME type is auto-negotiated.

Parameters

canvas

HTMLCanvasElement

player

Player

options?

RecordVideoOptions = {}

Returns

Promise<Blob>

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)