@@ -426,12 +426,32 @@ dictionary RTCEncodedVideoFrameMetadata {
426
426
// re-use or extend the equivalent defined in WebCodecs.
427
427
[Exposed=(Window,DedicatedWorker), Serializable]
428
428
interface RTCEncodedVideoFrame {
429
+ constructor(RTCEncodedVideoFrame originalFrame, RTCEncodedVideoFrameMetadata newMetadata);
429
430
readonly attribute RTCEncodedVideoFrameType type;
430
431
attribute ArrayBuffer data;
431
432
RTCEncodedVideoFrameMetadata getMetadata();
432
433
};
433
434
</pre>
434
435
436
+ ### Constructor ### {#RTCEncodedVideoFrame-members}
437
+ <dl dfn-for="RTCEncodedVideoFrame" class="dictionary-members">
438
+ <dt>
439
+ <dfn for="RTCEncodedVideoFrame" method>constructor()</dfn>
440
+ </dt>
441
+ <dd>
442
+ <p>
443
+ Create a new RTCEncodedVideoFrame from the given |originalFrame| and sets its metadata to |newMetadata|.
444
+
445
+ When called, run the following steps:
446
+
447
+ 1. Set this.`[[type]] ` to |originalFrame|.`[[type]] `.
448
+ 1. Set this.`[[data]] ` to |originalFrame|.`[[data]] `.
449
+ 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]] ` returns |newMetadata|.
450
+
451
+ </p>
452
+ </dd>
453
+ </dl>
454
+
435
455
### Members ### {#RTCEncodedVideoFrame-members}
436
456
<dl dfn-for="RTCEncodedVideoFrame" class="dictionary-members">
437
457
<dt>
@@ -626,11 +646,30 @@ dictionary RTCEncodedAudioFrameMetadata {
626
646
<pre class="idl">
627
647
[Exposed=(Window,DedicatedWorker), Serializable]
628
648
interface RTCEncodedAudioFrame {
649
+ constructor(RTCEncodedAudioFrame originalFrame, RTCEncodedAudioFrameMetadata newMetadata);
629
650
attribute ArrayBuffer data;
630
651
RTCEncodedAudioFrameMetadata getMetadata();
631
652
};
632
653
</pre>
633
654
655
+ ### Constructor ### {#RTCEncodedAudioFrame-members}
656
+ <dl dfn-for="RTCEncodedAudioFrame" class="dictionary-members">
657
+ <dt>
658
+ <dfn for="RTCEncodedAudioFrame" method>constructor()</dfn>
659
+ </dt>
660
+ <dd>
661
+ <p>
662
+ Create a new RTCEncodedAudioFrame from the given |originalFrame| and sets its metadata to |newMetadata|.
663
+
664
+ When called, run the following steps:
665
+
666
+ 1. Set this.`[[data]] ` to |originalFrame|.`[[data]] `.
667
+ 1. Set the internal representation of metadata to |newMetadata| such that this.`[[getMetadata()]] ` returns |newMetadata|.
668
+
669
+ </p>
670
+ </dd>
671
+ </dl>
672
+
634
673
### Members ### {#RTCEncodedAudioFrame-members}
635
674
<dl dfn-for="RTCEncodedAudioFrame" class="dictionary-members">
636
675
<dt>
0 commit comments