Skip to content

Commit

Permalink
add deep copy in the steps
Browse files Browse the repository at this point in the history
  • Loading branch information
palak8669 committed Apr 19, 2024
1 parent 18c1b3e commit 429171d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,8 @@ interface RTCEncodedVideoFrame {
1. Set this.`[[type]]` to |originalFrame|.`[[type]]`.
1. Let this.`[[data]]` be the result of [[CloneArrayBuffer]](|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
<p class="note">This does a "deep-copy" here.</p>
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`.
1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`.

</p>
</dd>
Expand Down Expand Up @@ -688,9 +687,8 @@ interface RTCEncodedAudioFrame {

1. Let this.`[[data]]` be the result of [[CloneArrayBuffer]](|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
1. Let `[[metadata]]` represent the metadata associated with this newly constructed frame.
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to `[[value]]`.
<p class="note">This does a "deep-copy" here.</p>
1. For each {`[[key]]`,`[[value]]`} pair of |originalFrame|.`[[getMetadata()]]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`.
1. For each {`[[key]]`,`[[value]]`} pair of |options|.`[metadata]`, set `[[metadata]]`.`[[key]]` to a deep copy of `[[value]]`.

</p>
</dd>
Expand Down

0 comments on commit 429171d

Please sign in to comment.