VideoEncoder: dequeue event
WebCodecs APIwindowanddedicated
WebCodecs APIwindow_and_dedicated
The **`dequeue`** event of the VideoEncoder interface fires to signal a decrease in VideoEncoder.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():
```js-nolint
addEventListener("dequeue", (event) => { })
```
Alternatively, assign to the [event handler property](/docs/Web/API/Document_Object_Model/Events#using_onevent_properties) of the interface:
```js-nolint
ondequeue = (event) => { }
```
## Example
```js
videoEncoder.addEventListener("dequeue", (event) => {
// Queue up more encoding work
});
```
## Specifications
## Browser compatibility
Cite this
"VideoEncoder: dequeue event". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/dequeue_event