VideoFrame: close() 方法

Baseline 2024
新推出

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

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

VideoFrame 介面的 close() 方法清除所有狀態並釋放對媒體資源的引用。

語法

js
close()

引數

無。

返回值

Undefined。

示例

以下示例展示了 VideoFrame 物件被關閉。

js
VideoFrame.close();

規範

規範
WebCodecs
# dom-videoframe-close

瀏覽器相容性