---
title: VideoFrame.close()
slug: Web/API/VideoFrame/close
tags:
  - API
  - Method
  - Reference
  - close
  - VideoFrame
browser-compat: api.VideoFrame.close
---
{{DefaultAPISidebar("Web Codecs API")}}

The **`close()`** method of the {{domxref("VideoFrame")}} interface clears all states and releases the reference to the media resource.

## Syntax

```js
VideoFrame.close()
```

### Parameters

None.

### Return Value

Undefined.

## Examples

The following example shows the `VideoFrame` object being closed.

```js
VideoFrame.close();
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

