EncodedAudioChunk:byteLength 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性在专用 Web Worker中可用。
EncodedAudioChunk
接口的只读属性 byteLength
返回编码音频数据的字节长度。
值
整型。
示例
以下示例将 byteLength
打印到控制台。
js
const init = {
type: "key",
data: audioBuffer,
timestamp: 23000000,
duration: 2000000,
};
const chunk = new EncodedAudioChunk(init);
console.log(chunk.byteLength); // 352800
规范
Specification |
---|
WebCodecs> # dom-encodedaudiochunk-bytelength> |
浏览器兼容性
Loading…