WasmExporter
class WasmExporter implements Exporter
The main interface for implementing custom exporters.
Constructors
constructor
public new WasmExporterproject: Projectsettings: RendererSettings: WasmExporter
Parameters
Properties
displayName
static readonly public displayName: 'Video (Wasm)' = 'Video (Wasm)'
id
static readonly public id: '@revideo/core/wasm' = '@revideo/core/wasm'
Methods
downloadVideos
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
assets: AssetInfo[][]
startFrame: number
endFrame: number
handleFrame
public handleFramecanvas: HTMLCanvasElement: Promisevoid
Export a frame.
Called each time after a frame is rendered.
Parameters
canvas: HTMLCanvasElement
A canvas containing the rendered frame.
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
static public createproject: Projectsettings: RendererSettings: PromiseWasmExporter
Parameters
meta
static public meta(): MetaFieldanyany