Get to know MDN better
Since November 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Note: This feature is available in Dedicated Web Workers.
The RTCEncodedAudioFrame() constructor creates a new and fully independent RTCEncodedAudioFrame object.
The new object is a deep clone of the original object data and metadata, with any metadata specified in the options parameter overwriting the copied values.
The frame to be copied.
options OptionalThis is an object with the following property:
metadata OptionalAn object setting the frame metadata. This is an object with the same properties as the object returned by RTCEncodedAudioFrame.getMetadata().
This snippet shows how you might copy a frame and modify its metadata. In this case we just update the capture time.
This kind of modification might be useful if you need to create multiple outgoing frames from a single incoming frame; for example, in order to relay media to another peer on the network. Generally you will not need to modify the metadata for a frame.
| WebRTC Encoded Transform # dom-rtcencodedaudioframe-constructor |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Oct 23, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.