W3cubDocs

/Web APIs

AudioDecoder: dequeue event

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The dequeue event of the AudioDecoder interface fires to signal a decrease in AudioDecoder.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

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

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
dequeue_event 106 106 No No 92 No 106 106 No 72 No 20.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/dequeue_event