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

The **`close()`** method of the {{domxref("VideoDecoder")}} interface ends all pending work and releases system resources.

## Syntax

```js
VideoDecoder.close()
```

### Parameters

None.

### Return Value

{{jsxref('undefined')}}.

## Examples

The following example closes the `VideoDecoder`.

```js
VideoDecoder.close();
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

