Skip to main content

WasmExporter

class WasmExporter implements Exporter

The main interface for implementing custom exporters.

Constructors

constructor

Parameters

Properties

displayName

static readonly public displayName: 'Video (Wasm)' = 'Video (Wasm)'

id

static readonly public id: '@revideo/core/wasm' = '@revideo/core/wasm'

Methods

downloadVideos

public downloadVideosassets: AssetInfo[][]: Promisevoid

Download all assets necessary for the export process

Parameters


generateAudio

public generateAudioassets: AssetInfo[][]startFrame: numberendFrame: number: Promisevoid

Take in media assets per frame and generate audio track for the video.

Parameters


handleFrame

public handleFramecanvas: HTMLCanvasElement: Promisevoid

Export a frame.

Called each time after a frame is rendered.

Parameters


mergeMedia

public mergeMedia(): Promisevoid

after processing the image stream and generating an audio file, merge the video and audio stream as the final video


start

public start(): Promisevoid

Begin the rendering process.

Called after the rendering has been set up, right before the first frame is rendered. Once start() is called, it is guaranteed that the stop() method will be called as well. Can be used to initialize any resources that require a clean-up.


stop

public stop(): Promisevoid

Finish the rendering process.

Called after rendering the visual elements has finished and audio so that audio track can be merged.


create

Parameters


meta

static public meta(): MetaFieldanyany