VideoDecoder: dequeue event
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
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 methods like addEventListener(), or set an event handler property.
js
addEventListener("dequeue", (event) => {});
ondequeue = (event) => {};
Example
js
videoDecoder.addEventListener("dequeue", (event) => {
// Queue up more encoding work
});
Specifications
| Specification |
|---|
| WebCodecs # eventdef-videodecoder-dequeue |
Browser compatibility
BCD tables only load in the browser