Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note: This feature is available in Dedicated Web Workers.
The EncodedAudioChunk() constructor creates a new EncodedAudioChunk object representing a chunk of encoded audio.
An object containing the following members:
typeIndicates if the chunk is a key chunk that does not rely on other frames for encoding. One of:
"key"The data is a key chunk.
"delta"The data is not a key chunk.
timestampAn integer representing the timestamp of the audio in microseconds.
durationAn integer representing the length of the audio in microseconds.
dataAn ArrayBuffer, a TypedArray, or a DataView containing the audio data.
transferAn array of ArrayBuffers that EncodedAudioChunk will detach and take ownership of. If the array contains the ArrayBuffer backing data, EncodedAudioChunk will use that buffer directly instead of copying from it.
In the following example a new EncodedAudioChunk is created.
| WebCodecs # dom-encodedaudiochunk-encodedaudiochunk |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Sep 11, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.