Skip to main content

Class: WebCodecsExporter

Defined in: src/export/WebCodecsExporter.ts:112

Deterministic WebCodecs-based video exporter for manim-web scenes.

Constructors​

Constructor​

new WebCodecsExporter(scene, options?): WebCodecsExporter

Defined in: src/export/WebCodecsExporter.ts:121

Create a new WebCodecsExporter.

Parameters​

scene​

ExportableScene

The scene to export

options?​

WebCodecsExportOptions

Export options

Returns​

WebCodecsExporter

Methods​

export()​

export(): Promise<Blob>

Defined in: src/export/WebCodecsExporter.ts:158

Export the scene to a video Blob.

Seeks and captures one VideoFrame per timeline frame, encodes it with the WebCodecs VideoEncoder, and muxes the encoded chunks into the configured container.

Returns​

Promise<Blob>

A Promise that resolves to the video Blob

Throws​

Error if WebCodecs is unavailable (use VideoExporter instead)


getOptions()​

getOptions(): Readonly<ResolvedWebCodecsExportOptions>

Defined in: src/export/WebCodecsExporter.ts:336

Get the resolved export options.

Returns​

Readonly<ResolvedWebCodecsExportOptions>


isSupported()​

static isSupported(): boolean

Defined in: src/export/WebCodecsExporter.ts:144

Feature-detect WebCodecs. Returns true when VideoEncoder is available.

Returns​

boolean