VideoFrame: close() method

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.

The close() method of the VideoFrame interface clears all states and releases the reference to the media resource.

Syntax

js
close()

Parameters

None.

Return value

Undefined.

Examples

The following example shows the VideoFrame object being closed.

js
VideoFrame.close();

Specifications

Specification
WebCodecs
# dom-videoframe-close

Browser compatibility