EncodedVideoChunk: 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 EncodedVideoChunk trả về độ dài tính bằng byte của dữ liệu video đã 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: videoBuffer,
timestamp: 23000000,
duration: 2000000,
};
const chunk = new EncodedVideoChunk(init);
console.log(chunk.byteLength); // 352800
Thông số kỹ thuật
| Specification |
|---|
| WebCodecs> # dom-encodedvideochunk-bytelength> |