EncoderBase()

Class representing all built-in WebAudioAPI audio encoders

new EncoderBase()

Called by a concrete encoder instance to initialize the inherited EncoderBase data structure.

Classes

EncoderBase

Methods

async encode(audioData, opt encodingOptions) → {Promise.<Blob>}

Encodes the corresponding audio buffer, and returns a Blob containing the newly encoded data.

Parameters:
Name Type Attributes Description
audioData AudioBuffer

AudioBuffer containing the data to encode

encodingOptions Object <optional>

Optional encoding-specific options such as 'bitRate'

Returns:
Promise.<Blob> -

Data Blob containing the newly encoded audio

See: