Skip to content

Commit

Permalink
Use CLoneArrayBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
palak8669 committed Apr 3, 2024
1 parent 3c35ee7 commit 417f896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.bs
Expand Up @@ -449,7 +449,7 @@ interface RTCEncodedVideoFrame {
When called, run the following steps:

1. Set this.`[[type]]` to |originalFrame|.`[[type]]`.
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]]`.
1. Let this.`[[data]]` be the result of <a href="https://tc39.es/ecma262/#sec-clonearraybuffer">CloneArrayBuffer</a>(|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
1. Let `[[metadata]]` be the internal slot that stores 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]`, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
Expand Down Expand Up @@ -673,7 +673,7 @@ interface RTCEncodedAudioFrame {

When called, run the following steps:

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]]`.
1. Let this.`[[data]]` be the result of <a href="https://tc39.es/ecma262/#sec-clonearraybuffer">CloneArrayBuffer</a>(|originalFrame|.`[[data]]`, 0, |originalFrame|.`[[data]]`.`[[ArrayBufferByteLength]]`).
1. Let `[[metadata]]` be the internal slot that stores 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]`, if the `[[value]]` exists, set `[[metadata]]`.`[[key]]` to `[[value]]`.
Expand Down

0 comments on commit 417f896

Please sign in to comment.