EncodedAudioChunk: byteLength property
Limited availability
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.
Thuộc tính chỉ đọc byteLength của giao diện EncodedAudioChunk trả về độ dài tính bằng byte của dữ liệu âm thanh đã mã hóa.
Giá trị
Một số nguyên.
Ví dụ
Trong ví dụ dưới đây, byteLength được in ra console.
js
const init = {
type: "key",
data: audioBuffer,
timestamp: 23000000,
duration: 2000000,
};
const chunk = new EncodedAudioChunk(init);
console.log(chunk.byteLength); // 352800
Thông số kỹ thuật
| Specification |
|---|
| WebCodecs> # dom-encodedaudiochunk-bytelength> |