@revideo/core / exporter / WasmExporter
Class: WasmExporter
Defined in: exporter/WasmExporter.ts:7
The main interface for implementing custom exporters.
Implements
Constructors
Constructor
new WasmExporter(
project,settings):WasmExporter
Defined in: exporter/WasmExporter.ts:15
Parameters
project
settings
Returns
WasmExporter
Properties
displayName
readonlystaticdisplayName:"Video (Wasm)"='Video (Wasm)'
Defined in: exporter/WasmExporter.ts:9
id
readonlystaticid:"@revideo/core/wasm"='@revideo/core/wasm'
Defined in: exporter/WasmExporter.ts:8
Methods
downloadVideos()
downloadVideos(
assets):Promise<void>
Defined in: exporter/WasmExporter.ts:101
Download all assets necessary for the export process
Parameters
assets
AssetInfo[][]
Returns
Promise<void>
Implementation of
generateAudio()
generateAudio(
assets,startFrame,endFrame):Promise<void>
Defined in: exporter/WasmExporter.ts:68
Take in media assets per frame and generate audio track for the video.
Parameters
assets
AssetInfo[][]
startFrame
number
endFrame
number
Returns
Promise<void>
Implementation of
handleFrame()
handleFrame(
canvas):Promise<void>
Defined in: exporter/WasmExporter.ts:37
Export a frame.
Parameters
canvas
HTMLCanvasElement
A canvas containing the rendered frame.
Returns
Promise<void>
Remarks
Called each time after a frame is rendered.
Implementation of
mergeMedia()
mergeMedia():
Promise<void>
Defined in: exporter/WasmExporter.ts:86
after processing the image stream and generating an audio file, merge the video and audio stream as the final video
Returns
Promise<void>
Implementation of
start()
start():
Promise<void>
Defined in: exporter/WasmExporter.ts:20
Begin the rendering process.
Returns
Promise<void>
Remarks
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.
Implementation of
stop()
stop():
Promise<void>
Defined in: exporter/WasmExporter.ts:43
Finish the rendering process.
Returns
Promise<void>
Remarks
Called after rendering the visual elements has finished and audio so that audio track can be merged.
Implementation of
create()
staticcreate(project,settings):Promise<WasmExporter>
Defined in: exporter/WasmExporter.ts:11
Parameters
project
settings
Returns
Promise<WasmExporter>