web api interface
AudioDecoder
Secure contextAvailable in workers
The AudioDecoder interface of the WebCodecs API decodes chunks of audio.
Constructor
AudioDecoder()- : Creates a new
AudioDecoderobject.
- : Creates a new
Instance properties
Inherits properties from its parent, EventTarget.
decodeQueueSizeRead only- : An integer representing the number of decode queue requests.
stateRead only- : Represents the state of the underlying codec and whether it is configured for decoding.
Events
dequeue- : Fires to signal a decrease in
decodeQueueSize.
- : Fires to signal a decrease in
Static methods
AudioDecoder.isConfigSupported()- : Returns a promise indicating whether the provided
AudioDecoderConfigis supported.
- : Returns a promise indicating whether the provided
Instance methods
Inherits methods from its parent, EventTarget.
configure()- : Enqueues a control message to configure the audio decoder for decoding chunks.
decode()- : Enqueues a control message to decode a given chunk of audio.
flush()- : Returns a promise that resolves once all pending messages in the queue have been completed.
reset()- : Resets all states including configuration, control messages in the control message queue, and all pending callbacks.
close()- : Ends all pending work and releases system resources.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.