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

The **`duration`** read-only property of the {{domxref("AudioData")}} interface returns the duration in microseconds of this `AudioData` object.

### Value

An integer.

## Examples

The below example prints the value of `duration` to the console.

```js
console.log(AudioData.duration);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}


