VideoFrame: codedRect 屬性

Baseline 2024
新推出

自 2024 年 9 月起,此功能已可在最新裝置和瀏覽器版本上使用。此功能可能無法在舊裝置或瀏覽器上使用。

注意:此功能在 專用 Web Workers 中可用。

VideoFrame 介面的 codedRect 屬性返回一個 DOMRectReadOnly,其寬度和高度與 VideoFrame.codedWidthVideoFrame.codedHeight 匹配。

一個 DOMRectReadOnly

示例

以下示例將 codedRect 列印到控制檯。

js
console.log(VideoFrame.codedRect);

規範

規範
WebCodecs
# dom-videoframe-codedrect

瀏覽器相容性