diff --git a/index.bs b/index.bs index e7aabd4..794dab4 100644 --- a/index.bs +++ b/index.bs @@ -426,12 +426,32 @@ dictionary RTCEncodedVideoFrameMetadata { // re-use or extend the equivalent defined in WebCodecs. [Exposed=(Window,DedicatedWorker), Serializable] interface RTCEncodedVideoFrame { + constructor(RTCEncodedVideoFrame originalFrame, RTCEncodedVideoFrameMetadata newMetadata); readonly attribute RTCEncodedVideoFrameType type; attribute ArrayBuffer data; RTCEncodedVideoFrameMetadata getMetadata(); }; +### Constructor ### {#RTCEncodedVideoFrame-members} +
+ Create a new RTCEncodedVideoFrame from the given |originalFrame| and sets its metadata to |newMetadata|. + + When called, run the following steps: + + 1. Set this.`[[type]]` to |originalFrame|.`[[type]]`. + 1. Set this.`[[data]]` to |originalFrame|.`[[data]]`. + 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]]` returns |newMetadata|. + +
+[Exposed=(Window,DedicatedWorker), Serializable] interface RTCEncodedAudioFrame { + constructor(RTCEncodedAudioFrame originalFrame, RTCEncodedAudioFrameMetadata newMetadata); attribute ArrayBuffer data; RTCEncodedAudioFrameMetadata getMetadata(); };+### Constructor ### {#RTCEncodedAudioFrame-members} +
+ Create a new RTCEncodedAudioFrame from the given |originalFrame| and sets its metadata to |newMetadata|. + + When called, run the following steps: + + 1. Set this.`[[data]]` to |originalFrame|.`[[data]]`. + 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]]` returns |newMetadata|. + +
+