Firefox Tomorrow

web api instance method

AudioDecoder: flush() method

View on MDN ↗

Secure contextAvailable in workers

The flush() method of the AudioDecoder interface returns a Promise that resolves once all pending messages in the queue have been completed.

Syntax

flush()

Parameters

None.

Return value

A Promise that resolves with undefined.

Exceptions

If an error occurs, the promise will resolve with one of the following exceptions:

  • InvalidStateError DOMException
    • : Returned if the Promise is rejected because the state is not configured.

Examples

The following example flushes the AudioDecoder.

await audioDecoder.flush();

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.