EncodedAudioChunk
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is available in Dedicated Web Workers.
The EncodedAudioChunk interface of the WebCodecs API represents a chunk of encoded audio data.
Constructor
EncodedAudioChunk()Experimental-
Creates a new
EncodedAudioChunkobject.
Instance properties
EncodedAudioChunk.typeRead only Experimental-
Returns a string indicating whether this chunk of data is a key chunk.
EncodedAudioChunk.timestampRead only Experimental-
Returns an integer representing the timestamp of the audio in microseconds.
EncodedAudioChunk.durationRead only Experimental-
Returns an integer representing the duration of the audio in microseconds.
EncodedAudioChunk.byteLengthRead only Experimental-
Returns an integer representing the length of the audio in bytes.
Instance methods
EncodedAudioChunk.copyTo()Experimental-
Copies the encoded audio data.
Specifications
| Specification |
|---|
| WebCodecs # encodedaudiochunk-interface |
Browser compatibility
| desktop | mobile | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
EncodedAudioChunk | |||||||||||
EncodedAudioChunk() constructor | |||||||||||
byteLength | |||||||||||
copyTo | |||||||||||
duration | |||||||||||
timestamp | |||||||||||
type | |||||||||||