Back to Content

AudioData: duration property

files/en-us/web/api/audiodata/duration/index.md

latest442 B
Original Source

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

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}}