e01.org

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():

```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
videoDecoder.addEventListener("dequeue", (event) => {
// Queue up more encoding work
});
```

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"VideoDecoder: dequeue event". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/dequeue_event

JSON record · API collection · citation policy