EncodedAudioChunk: type 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 type của giao diện EncodedAudioChunk trả về một giá trị cho biết liệu audio chunk có phải là key chunk, không phụ thuộc vào các frame khác để giải mã.
Giá trị
Một chuỗi, một trong:
Ví dụ
Trong ví dụ dưới đây, type được in ra console.
js
const init = {
type: "key",
data: audioBuffer,
timestamp: 23000000,
duration: 2000000,
};
const chunk = new EncodedAudioChunk(init);
console.log(chunk.type); // "key"
Thông số kỹ thuật
| Specification |
|---|
| WebCodecs> # dom-encodedaudiochunk-type> |