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

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

## Syntax

```js
AudioData.close()
```

### Parameters

None.

### Return Value

Undefined.

## Examples

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

```js
AudioData.close();
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
