AudioDecoder: flush() method
WebCodecs APIwindowanddedicated
WebCodecs APIwindow_and_dedicated
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:
InvalidStateErrorDOMException- : Returned if the Promise is rejected because the state is not
configured.
Examples
The following example flushes the AudioDecoder.
await audioDecoder.flush();