Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/api/audiodata/clone/index.md
6537 views
---
title: AudioData.clone() slug: Web/API/AudioData/clone page-type: web-api-instance-method status: - experimental browser-compat: api.AudioData.clone
---

{{APIRef("WebCodecs API")}}{{SeeCompatTable}}

The clone() method of the {{domxref("AudioData")}} interface creates a new AudioData object with reference to the same media resource as the original.

Syntax

clone()

Parameters

None.

Return value

The cloned {{domxref("AudioData")}} object.

Exceptions

  • InvalidStateError {{domxref("DOMException")}}

Examples

The following example clones a copy of AudioData as audioData2.

let audioData2 = AudioData.clone();

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}