Skip to content

Commit dccb6f6

Browse files
committed
update wording of metadata
1 parent 303d24f commit dccb6f6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.bs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ interface RTCEncodedVideoFrame {
446446

447447
1. Set this.`[[type]]` to |originalFrame|.`[[type]]`.
448448
1. Let this.`[[data]]` be a new ArrayBuffer object whose `[[ArrayBufferData]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferData]]`, and whose `[[ArrayBufferByteLength]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`.
449-
1. If |newMetadata| is not empty, set the internal representation of metadata to |newMetadata| such that {{RTCEncodedVideoFrame/getMetadata()}} returns |newMetadata|. Otherwise, set the internal representation of metadata to originalFrame.`[[getMetadata()]]`.
449+
1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
450+
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
451+
1. For each {`[[key]]`,`[[value]]`} pair of |newMetadata|, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
450452

451453
</p>
452454
</dd>
@@ -664,7 +666,9 @@ interface RTCEncodedAudioFrame {
664666
When called, run the following steps:
665667

666668
1. Let this.`[[data]]` be a new ArrayBuffer object whose `[[ArrayBufferData]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferData]]`, and whose `[[ArrayBufferByteLength]]` internal slot value is |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`.
667-
1. If |newMetadata| is not empty, set the internal representation of metadata to |newMetadata| such that {{RTCEncodedAudioFrame/getMetadata()}} returns |newMetadata|. Otherwise, set the internal representation of metadata to originalFrame.`[[getMetadata()]]`.
669+
1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
670+
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
671+
1. For each {`[[key]]`,`[[value]]`} pair of |newMetadata|, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
668672

669673
</p>
670674
</dd>

0 commit comments

Comments
 (0)