Path: blob/main/files/en-us/web/api/audiodata/clone/index.md
6537 views
------{{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
Parameters
None.
Return value
The cloned {{domxref("AudioData")}} object.
Exceptions
InvalidStateError{{domxref("DOMException")}}: Thrown if the
AudioDataobject has been transferred.
Examples
The following example clones a copy of AudioData as audioData2.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}