mwg API
    Preparing search index...

    Interface AudioExportOptions

    interface AudioExportOptions {
        defaultTags?: Readonly<Record<string, string>>;
        encoders?: Partial<Record<"opus" | "flac", ExportEncoder>>;
        inWorker?: boolean;
        maxBytes?: number;
        opusAvailable?: () => boolean;
        saver?: (blob: Blob, filename: string) => void | Promise<void>;
    }
    Index
    defaultTags?: Readonly<Record<string, string>>

    tags every export carries unless the request overrides them

    encoders?: Partial<Record<"opus" | "flac", ExportEncoder>>

    the encoders for the formats mwg does not write itself (flac, opus); WAV is built in. A format without an encoder is not offered by formats() and is refused by export.

    inWorker?: boolean

    run the FLAC and Opus encoders on a worker thread (threads.spawn) so a long export leaves the frame alone. Only for encoders that are self-contained (no closures, no imports: they are shipped to the worker as text); onProgress is not called from a worker. Where no worker exists the encoder runs on this thread instead. False when omitted.

    maxBytes?: number

    refuses an export whose estimated size is larger; 256 MiB when omitted

    opusAvailable?: () => boolean

    whether Opus encoding works here (a WebCodecs AudioEncoder exists); true when omitted

    saver?: (blob: Blob, filename: string) => void | Promise<void>

    puts a finished file where the player can reach it; downloadSaver when omitted