Skip to content

Commit f366da7

Browse files
committed
Fix typos
1 parent f32e5f3 commit f366da7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

explainer.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const audioWriter = new AudioTrackWriter();
9393
videoElem.srcObject = new MediaStream([audioWriter.track, videoWriter.track]);
9494

9595
// Finally the decoders are created and the encoded media is piped through the decoder
96-
// and into the TrackerWriters which conver them into MediaStreamTracks
96+
// and into the TrackerWriters which converts them into MediaStreamTracks.
9797
const audioDecoder = new AudioDecoder({codec: 'opus'});
9898
const videoDecoder = new VideoDecoder({codec: 'vp8'});
9999
encodedAudio.pipeThrough(audioDecoder).pipeTo(audioWriter.writable);
@@ -105,16 +105,16 @@ encodedVideo.pipeThrough(videoDecoder).pipeTo(videoWriter.writable);
105105
```javascript
106106
// The app provides sources of audio and video, perhaps from getUserMedia.
107107
const {audioTrack, videoTrack} = ...;
108-
// The app also provides a way to serizlize/containerize encoded media and upload it.
108+
// The app also provides a way to serialize/containerize encoded media and upload it.
109109
// The browser provides the app byte arrays defined by a codec such as vp8 or opus
110110
// (not in a media container such as mp4 or webm).
111111
function muxAndSend(encodedAudio, encodedVideo) { ... };
112112

113-
// First, the tracks are converted to ReadableStreams of encoded audio and video.
113+
// First, the tracks are converted to ReadableStreams of unencoded audio and video.
114114
const audio = (new AudioTrackReader(audioTrack)).readable;
115115
const video = (new VideoTrackReader(videoTrack)).readable;
116116

117-
// Lastly, build the encoders and pass media through them
117+
// Lastly, build the encoders and pass media through them.
118118
const audioEncoder = new AudioEncoder({
119119
codec: 'opus',
120120
settings: {
@@ -137,7 +137,7 @@ muxAndSend(encodedAudio, encodedVideo);
137137
### Example of transcoding or offline encode/decode
138138

139139
```javascript
140-
// App provides a way to demux (decontainerize) and mux (containerize) media
140+
// App provides a way to demux (decontainerize) and mux (containerize) media.
141141
function demux(input) { ... }
142142
function mux(audio, video) { ... }
143143
const input = ...;
@@ -170,10 +170,10 @@ const output = mux(audioOut, videoOut);
170170
```javascript
171171
// The app provides sources of audio and video, perhaps from getUserMedia.
172172
const {audioTrack, videoTrack} = ...;
173-
// The app also provides ways to send audio and video frames.
173+
// The app also provides ways to send encoded audio and video bitstream.
174174
function sendMedia(encodedAudio, encodedVideo) { ... };
175175

176-
// First, the tracks are converted to ReadableStreams of encoded audio and video.
176+
// First, the tracks are converted to ReadableStreams of framed bitstream chunks.
177177
const audio = (new AudioTrackReader(audioTrack)).readable;
178178
const video = (new VideoTrackReader(videoTrack)).readable;
179179

@@ -209,7 +209,7 @@ const audioWriter = new AudioTrackWriter();
209209
videoElem.srcObject = new MediaStream([audioWriter.track, videoWriter.track]);
210210

211211
// Finally the decoders are created and the encoded media is piped through the decoder
212-
// and into the TrackerWriters which conver them into MediaStreamTracks
212+
// and into the TrackerWriters which converts them into MediaStreamTracks.
213213
const audioDecoder = new AudioDecoder({codec: 'opus'});
214214
const videoDecoder = new VideoDecoder({codec: 'vp8'});
215215
encodedAudio.pipeThrough(audioDecoder).pipeTo(audioWriter.writable);

0 commit comments

Comments
 (0)