EncodedVideoChunk: timestamp property
Khả dụng hạn chế
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 timestamp của giao diện EncodedVideoChunk trả về một số nguyên cho biết timestamp của video tính bằng micro giây.
Giá trị
Một số nguyên.
Ví dụ
Trong ví dụ dưới đây, timestamp được in ra console.
js
const init = {
type: "key",
data: videoBuffer,
timestamp: 23000000,
duration: 2000000,
};
const chunk = new EncodedVideoChunk(init);
console.log(chunk.timestamp); // 23000000
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebCodecs> # dom-encodedvideochunk-timestamp> |