AudioEncoder: dequeue event
WebCodecs APIwindowanddedicated
WebCodecs APIwindow_and_dedicated
The dequeue event of the AudioEncoder interface fires to signal a decrease in AudioEncoder.encodeQueueSize.
This eliminates the need for developers to use a setTimeout() poll to determine when the queue has decreased, and more work should be queued up.
Syntax
Use the event name in addEventListener():
addEventListener("dequeue", (event) => { })
Alternatively, assign to the event handler property of the interface:
ondequeue = (event) => { }
Example
audioEncoder.addEventListener("dequeue", (event) => {
// Queue up more encoding work
});