Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/api/audioencoder/dequeue_event/index.md
6515 views
---
title: "AudioEncoder: dequeue event" slug: Web/API/AudioEncoder/dequeue_event page-type: web-api-event status: - experimental browser-compat: api.AudioEncoder.dequeue_event
---

{{securecontext_header}}{{APIRef("WebCodecs API")}}{{SeeCompatTable}}

The dequeue event of the {{domxref("AudioEncoder")}} interface fires to signal a decrease in {{domxref("AudioEncoder.encodeQueueSize")}}.

This eliminates the need for developers to use a {{domxref("setTimeout", "setTimeout()")}} poll to determine when the queue has decreased, and more work should be queued up.

Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property.

addEventListener("dequeue", (event) => {}); ondequeue = (event) => {};

Example

audioEncoder.addEventListener("dequeue", (event) => { // Queue up more encoding work });

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}