mwg API
    Preparing search index...

    Variable webCodecsOpusEncoderConst

    webCodecsOpusEncoder: ExportEncoder = ...

    An ExportEncoder for Opus over WebCodecs: brings the frames to 48 kHz, feeds 20 ms blocks to an AudioEncoder at the requested bit rate (128 kbit/s when omitted), and wraps the packets in an Ogg stream with the request's tags. Browser only (isOpusEncodingAvailable); it is not self-contained, so it runs on the thread that calls it.

    import { AudioExport, isOpusEncodingAvailable, webCodecsOpusEncoder } from '@datamoc/mwg/audio';

    const service = new AudioExport({
    encoders: { opus: webCodecsOpusEncoder },
    opusAvailable: isOpusEncodingAvailable,
    });
    console.log(service.formats());