Skip to content

Commit 712d207

Browse files
author
Guido Urdaneta
committed
Address review comments
1 parent ebb157c commit 712d207

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

explainer.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ of an encoded frame and adds 4 bytes of padding.
7474
let view = new DataView(chunk.data);
7575
// Create a new buffer with 4 additional bytes.
7676
let newData = new ArrayBuffer(chunk.data.byteLength + 4);
77-
Let newView = new DataView(newData);
77+
let newView = new DataView(newData);
7878

7979
// Fill the new buffer with a negated version of all
8080
// the bits in the original frame.
8181
for (let i = 0; i < chunk.data.byteLength; ++i)
8282
newView.setInt8(i, ~view.getInt8(i));
8383
// Set the padding bytes to zero.
84-
For (let i = 0; i < 4; ++i)
84+
for (let i = 0; i < 4; ++i)
8585
newView.setInt8(chunk.data.byteLength + i, 0);
8686

8787
// Replace the frame's data with the new buffer.
@@ -111,7 +111,6 @@ let senderStreams = videoSender.getEncodedVideoStreams();
111111
senderStreams.readable
112112
.pipeThrough(senderTransform)
113113
.pipeTo(senderStreams.writable);
114-
}
115114
</pre>
116115

117116
4. Do the corresponding operations on the receiver side.
@@ -149,11 +148,10 @@ pc.ontrack = e => {
149148
},
150149
});
151150

152-
let receiver_streams = video_receiver.createEncodedVideoStreams();
153-
receiver_streams.readable
154-
.pipeThrough(my_transform)
155-
.pipeTo(receiver_streams.writable);
156-
}
151+
let receiverStreams = videoReceiver.createEncodedVideoStreams();
152+
receiverStreams.readable
153+
.pipeThrough(receiverTransform)
154+
.pipeTo(receiverStreams.writable);
157155
}
158156
</pre>
159157

0 commit comments

Comments
 (0)