Skip to content

Commit d14a6c5

Browse files
authored
Fix typos in docs and code (#944)
1 parent 7f48d34 commit d14a6c5

10 files changed

Lines changed: 35 additions & 33 deletions

File tree

‎.changes/fix-typos‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
patch type="docs" "Fix typos and inconsistencies in README and CHANGELOG"
2+
patch type="fixed" "Correct spelling in E2EE log and error messages"

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
* fix: memory leak visualizer stop android (#831)
6363
* fix: ensure engine always has correct device id if switching camera fails (#820)
6464
* fix: Always emit RoomDisconnectedEvent when the reason is clientInitiated. (#821)
65-
* fix: sif frame enqueing with e2ee (#822)
65+
* fix: sif frame enqueuing with e2ee (#822)
6666
* fix: update camera `deviceId` when track is null (#814)
6767
* feat: Audio Visualizer for Windows/Linux. (#739)
6868

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ room.localParticipant.setScreenShareEnabled(true);
221221

222222
On Android, you will have to use a [media projection foreground service](https://developer.android.com/develop/background-work/services/fg-service-types#media-projection).
223223

224-
In our example, we use the `flutter_background` package to handle this. In the app's AndroidManifest.xml file, declare the service with the appropriate types and permissions as following:
224+
In our example, we use the `flutter_background` package to handle this. In the app's AndroidManifest.xml file, declare the service with the appropriate types and permissions as follows:
225225

226226
```xml title="AndroidManifest.xml"
227227
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
@@ -248,7 +248,7 @@ other apps. See [setup guide](https://github.com/flutter-webrtc/flutter-webrtc/w
248248

249249
#### Desktop(Windows/macOS)
250250

251-
On dekstop you can use `ScreenSelectDialog` to select the window or screen you want to share.
251+
On desktop you can use `ScreenSelectDialog` to select the window or screen you want to share.
252252

253253
```dart
254254
try {
@@ -282,10 +282,10 @@ By default, the native platform can support E2EE without any settings, but for f
282282
# for example app
283283
dart compile js web/e2ee.worker.dart -o example/web/e2ee.worker.dart.js -m
284284
# for your project
285-
export YOU_PROJECT_DIR=your_project_dir
285+
export YOUR_PROJECT_DIR=your_project_dir
286286
git clone https://github.com/livekit/client-sdk-flutter.git
287287
cd client-sdk-flutter && flutter pub get
288-
dart compile js web/e2ee.worker.dart -o ${YOU_PROJECT_DIR}/web/e2ee.worker.dart.js -m
288+
dart compile js web/e2ee.worker.dart -o ${YOUR_PROJECT_DIR}/web/e2ee.worker.dart.js -m
289289
```
290290

291291
### Advanced track manipulation
@@ -460,7 +460,7 @@ class _VideoViewState extends State<VideoView> {
460460

461461
### Mute, unmute local tracks
462462

463-
On `LocalTrackPublication`s, you could control if the track is muted by setting its `muted` property. Changing the mute status will generate an `onTrackMuted` or `onTrack Unmuted` delegate call for the local participant. Other participant will receive the status change as well.
463+
On `LocalTrackPublication`s, you can control whether the track is muted by setting its `muted` property. Changing the mute status will emit a `TrackMutedEvent` or `TrackUnmutedEvent` for the local participant. Other participants will receive the status change as well.
464464

465465
```dart
466466
// mute track

‎example/ios/LiveKit Broadcast Extension/SocketConnection.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ extension SocketConnection: StreamDelegate {
100100
streamHasSpaceAvailable?()
101101
}
102102
case .errorOccurred:
103-
os_log(.debug, log: broadcastLogger, "client stream error occured: \(String(describing: aStream.streamError))")
103+
os_log(.debug, log: broadcastLogger, "client stream error occurred: \(String(describing: aStream.streamError))")
104104
close()
105105
notifyDidClose(error: aStream.streamError)
106106

‎example/web/e2ee.worker.dart.js‎

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/src/events.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ class TrackSubscribedEvent with RoomEvent, ParticipantEvent {
285285
'track: ${track})';
286286
}
287287

288-
/// An error has occured during track subscription.
288+
/// An error has occurred during track subscription.
289289
/// Emitted by [Room] and [RemoteParticipant].
290290
class TrackSubscriptionExceptionEvent with RoomEvent, ParticipantEvent {
291291
final RemoteParticipant? participant;
@@ -321,7 +321,7 @@ class TrackUnsubscribedEvent with RoomEvent, ParticipantEvent {
321321
'track: ${track})';
322322
}
323323

324-
/// A Participant has muted one of the track.
324+
/// A Participant has muted one of the tracks.
325325
/// Emitted by [RemoteParticipant] and [LocalParticipant].
326326
class TrackMutedEvent with RoomEvent, ParticipantEvent {
327327
final Participant participant;

‎lib/src/exceptions.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ enum ConnectionErrorReason {
2727
Timeout,
2828
}
2929

30-
/// An exception occured while attempting to connect.
30+
/// An exception occurred while attempting to connect.
3131
/// Common reasons:
3232
/// - Invalid token (make sure your token is generated correctly)
3333
/// - Network condition is not good
@@ -42,7 +42,7 @@ class ConnectException extends LiveKitException {
4242
}) : super._(msg);
4343
}
4444

45-
/// An exception occured while attempting to disconnect.
45+
/// An exception occurred while attempting to disconnect.
4646
/// Common reasons:
4747
/// - Network condition is not good.
4848
/// - SFU deploy behind a NAT and not configured correctly.

‎shared_cpp/pffft.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void pffft_zconvolve_accumulate(PFFFT_Setup* setup,
187187
void* pffft_aligned_malloc(size_t nb_bytes);
188188
void pffft_aligned_free(void*);
189189

190-
/* return 4 or 1 wether support SSE/Altivec instructions was enable when
190+
/* return 4 or 1 whether support for SSE/Altivec instructions was enabled when
191191
* building pffft.c */
192192
int pffft_simd_size();
193193

‎web/e2ee.data_packet_cryptor.dart‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class E2EEDataPacketCryptor {
126126
) async {
127127
var ratchetCount = 0;
128128

129-
logger.fine('decodeFunction: data packet lenght ${encryptedPacket.data.length}');
129+
logger.fine('decodeFunction: data packet length ${encryptedPacket.data.length}');
130130

131131
ByteBuffer? decrypted;
132132
KeySet? initialKeySet;
@@ -177,9 +177,9 @@ class E2EEDataPacketCryptor {
177177
}
178178
}
179179

180-
Future<void> ratchedKeyInternal() async {
180+
Future<void> ratchetKeyInternal() async {
181181
if (ratchetCount >= keyOptions.ratchetWindowSize || keyOptions.ratchetWindowSize <= 0) {
182-
throw Exception('[ratchedKeyInternal] cannot ratchet anymore');
182+
throw Exception('[ratchetKeyInternal] cannot ratchet anymore');
183183
}
184184

185185
final newKeyBuffer = await keyHandler.ratchet(currentkeySet.material, keyOptions.ratchetSalt);
@@ -196,11 +196,11 @@ class E2EEDataPacketCryptor {
196196
await decryptFrameInternal();
197197
} catch (e) {
198198
logger.finer('decodeFunction: kInternalError catch $e');
199-
await ratchedKeyInternal();
199+
await ratchetKeyInternal();
200200
}
201201

202202
if (decrypted == null) {
203-
throw Exception('[decodeFunction] decryption failed even after ratchting');
203+
throw Exception('[decodeFunction] decryption failed even after ratcheting');
204204
}
205205

206206
// we can now be sure that decryption was a success

‎web/e2ee.frame_cryptor.dart‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class FrameCryptor {
400400
srcFrame.buffer.isEmpty) {
401401
sifGuard.recordUserFrame();
402402
if (keyOptions.discardFrameWhenCryptorNotReady) return;
403-
logger.fine('enqueing empty dtx frame');
403+
logger.fine('enqueuing empty dtx frame');
404404
controller.enqueue(frameObj);
405405
return;
406406
}
@@ -419,9 +419,9 @@ class FrameCryptor {
419419
final finalBuffer = BytesBuilder();
420420
finalBuffer
421421
.add(Uint8List.fromList(srcFrame.buffer.sublist(0, srcFrame.buffer.length - (magicBytes.length + 1))));
422-
logger.fine('decodeFunction: enqueing silent frame src: ${srcFrame.buffer}');
422+
logger.fine('decodeFunction: enqueuing silent frame src: ${srcFrame.buffer}');
423423
enqueueFrame(frameObj, controller, finalBuffer);
424-
logger.fine('decodeFunction: enqueing done');
424+
logger.fine('decodeFunction: enqueuing done');
425425
return;
426426
} else {
427427
logger.warning('decodeFunction: SIF limit reached, dropping frame');
@@ -514,9 +514,9 @@ class FrameCryptor {
514514
}
515515
}
516516

517-
Future<void> ratchedKeyInternal() async {
517+
Future<void> ratchetKeyInternal() async {
518518
if (ratchetCount >= keyOptions.ratchetWindowSize || keyOptions.ratchetWindowSize <= 0) {
519-
throw Exception('[ratchedKeyInternal] cannot ratchet anymore');
519+
throw Exception('[ratchetKeyInternal] cannot ratchet anymore');
520520
}
521521

522522
final newKeyBuffer = await keyHandler.ratchet(currentkeySet.material, keyOptions.ratchetSalt);
@@ -534,11 +534,11 @@ class FrameCryptor {
534534
} catch (e) {
535535
lastError = CryptorError.kInternalError;
536536
logger.finer('decodeFunction: kInternalError catch $e');
537-
await ratchedKeyInternal();
537+
await ratchetKeyInternal();
538538
}
539539

540540
if (decrypted == null) {
541-
throw Exception('[decodeFunction] decryption failed even after ratchting');
541+
throw Exception('[decodeFunction] decryption failed even after ratcheting');
542542
}
543543

544544
// we can now be sure that decryption was a success

0 commit comments

Comments
 (0)