VideoFrame: colorSpace property

Baseline 2024
Newly available

Since September 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Note: This feature is available in Dedicated Web Workers.

Thuộc tính colorSpace của giao diện VideoFrame trả về một đối tượng VideoColorSpace đại diện cho không gian màu của video.

Giá trị

Một đối tượng VideoColorSpace.

Ví dụ

Ví dụ sau in colorSpace ra console.

js
const cnv = document.createElement("canvas");
// draw something on the canvas
// …
const videoFrame = new VideoFrame(cnv, { timestamp: 0 });
console.log(videoFrame.colorSpace);

Thông số kỹ thuật

Thông số kỹ thuật
WebCodecs
# dom-videoframe-colorspace

Tương thích trình duyệt