web api interface
AudioEncoder
Secure contextAvailable in workers
The AudioEncoder interface of the WebCodecs API encodes AudioData objects.
Constructor
AudioEncoder()- : Creates a new
AudioEncoderobject.
- : Creates a new
Instance properties
Inherits properties from its parent, EventTarget.
encodeQueueSizeRead only- : An integer representing the number of encode queue requests.
stateRead only- : Represents the state of the underlying codec and whether it is configured for encoding.
Events
dequeue- : Fires to signal a decrease in
encodeQueueSize.
- : Fires to signal a decrease in
Static methods
AudioEncoder.isConfigSupported()- : Returns a promise indicating whether the provided
AudioEncoderConfigis 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 encoder for encoding chunks.
encode()- : Enqueues a control message to encode a given
AudioDataobjects.
- : Enqueues a control message to encode a given
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.