A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/AudioDecoder/AudioDecoder below:

AudioDecoder: AudioDecoder() constructor - Web APIs

AudioDecoder: AudioDecoder() constructor

Limited availability

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Dedicated Web Workers.

The AudioDecoder() constructor creates a new AudioDecoder object with the provided init.output callback assigned as the output callback, the provided init.error callback as the error callback, and the AudioDecoder.state set to "unconfigured".

Syntax Parameters
init

A dictionary object containing two required callbacks.

output

A callback which is passed a single argument of an AudioData object.

error

A callback which is passed a single argument of the error that has been thrown.

Examples

In the following example an AudioDecoder is created with the two required callback functions, one to deal with the decoded chunk and the other to handle errors.

const audioDecoder = new AudioDecoder({
  output: processAudio,
  error: onEncoderError,
});
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4