AudioDecoder: decode() method
WebCodecs APIwindowanddedicated
WebCodecs APIwindow_and_dedicated
The decode() method of the AudioDecoder interface enqueues a control message to decode a given chunk of audio.
Syntax
decode(chunk)
Parameters
chunk- : An EncodedAudioChunk object representing a chunk of encoded audio.
Return value
None (undefined).
Exceptions
InvalidStateErrorDOMException- : Thrown if the state is not
"configured". DataErrorDOMException- : Thrown if the
chunkis unable to be decoded due to relying on other frames for decoding.