VideoDecoder: dequeue event
WebCodecs APIwindowanddedicated
WebCodecs APIwindow_and_dedicated
The dequeue event of the VideoDecoder interface fires to signal a decrease in VideoDecoder.decodeQueueSize.
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
videoDecoder.addEventListener("dequeue", (event) => {
// Queue up more encoding work
});