RTCEncodedVideoFrame: RTCEncodedVideoFrame() constructor

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Note: This feature is available in Dedicated Web Workers.

The RTCEncodedVideoFrame() constructor creates a new and fully independent RTCEncodedVideoFrame 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.

Syntax

js
new RTCEncodedVideoFrame(originalFrame);
new RTCEncodedVideoFrame(originalFrame, options);

Parameters

originalFrame

The frame to be copied.

options Optional

This is an object with the following property:

metadata Optional

An object setting the frame metadata. This is object has the same properties as the object returned by RTCEncodedVideoFrame.getMetadata().

Exceptions

Specifications

Specification
WebRTC Encoded Transform
# dom-rtcencodedvideoframe-constructor

Browser compatibility