Skip to content

Commit 3adcfc7

Browse files
authored
* fix: Expose keyRingSize/discardFrameWhenCryptorNotReady parameters for KeyProvider. (#495)
1 parent 8bb9350 commit 3adcfc7

File tree

6 files changed

+22
-12
lines changed

6 files changed

+22
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.1.2
4+
5+
* fix: Expose keyRingSize/discardFrameWhenCryptorNotReady parameters for KeyProvider
6+
37
## 2.1.1
48

59
* update to package:web (#484)

ios/livekit_client.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'livekit_client'
3-
s.version = '2.1.1'
3+
s.version = '2.1.2'
44
s.summary = 'Open source platform for real-time audio and video.'
55
s.description = 'Open source platform for real-time audio and video.'
66
s.homepage = 'https://livekit.io/'

lib/src/e2ee/key_provider.dart

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const defaultRatchetSalt = 'LKFrameEncryptionKey';
2323
const defaultMagicBytes = 'LK-ROCKS';
2424
const defaultRatchetWindowSize = 16;
2525
const defaultFailureTolerance = -1;
26+
const defaultKeyRingSize = 16;
27+
const defaultDiscardFrameWhenCryptorNotReady = false;
2628

2729
class KeyInfo {
2830
final String participantId;
@@ -70,16 +72,20 @@ class BaseKeyProvider implements KeyProvider {
7072
String? uncryptedMagicBytes,
7173
int? ratchetWindowSize,
7274
int? failureTolerance,
75+
int? keyRingSize,
76+
bool? discardFrameWhenCryptorNotReady,
7377
}) async {
7478
rtc.KeyProviderOptions options = rtc.KeyProviderOptions(
75-
sharedKey: sharedKey,
76-
ratchetSalt:
77-
Uint8List.fromList((ratchetSalt ?? defaultRatchetSalt).codeUnits),
78-
ratchetWindowSize: ratchetWindowSize ?? defaultRatchetWindowSize,
79-
uncryptedMagicBytes: Uint8List.fromList(
80-
(uncryptedMagicBytes ?? defaultMagicBytes).codeUnits),
81-
failureTolerance: failureTolerance ?? defaultFailureTolerance,
82-
);
79+
sharedKey: sharedKey,
80+
ratchetSalt:
81+
Uint8List.fromList((ratchetSalt ?? defaultRatchetSalt).codeUnits),
82+
ratchetWindowSize: ratchetWindowSize ?? defaultRatchetWindowSize,
83+
uncryptedMagicBytes: Uint8List.fromList(
84+
(uncryptedMagicBytes ?? defaultMagicBytes).codeUnits),
85+
failureTolerance: failureTolerance ?? defaultFailureTolerance,
86+
keyRingSize: keyRingSize ?? defaultKeyRingSize,
87+
discardFrameWhenCryptorNotReady:
88+
defaultDiscardFrameWhenCryptorNotReady);
8389
final keyProvider =
8490
await rtc.frameCryptorFactory.createDefaultKeyProvider(options);
8591
return BaseKeyProvider(keyProvider, options);

lib/src/livekit.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
/// Main entry point to connect to a room.
1616
/// {@category Room}
1717
class LiveKitClient {
18-
static const version = '2.1.1';
18+
static const version = '2.1.2';
1919
}

macos/livekit_client.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'livekit_client'
3-
s.version = '2.1.1'
3+
s.version = '2.1.2'
44
s.summary = 'Open source platform for real-time audio and video.'
55
s.description = 'Open source platform for real-time audio and video.'
66
s.homepage = 'https://livekit.io/'

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
name: livekit_client
1616
description: Flutter Client SDK for LiveKit.
1717
Build real-time video and audio into your apps. Supports iOS, Android, and Web.
18-
version: 2.1.1
18+
version: 2.1.2
1919
homepage: https://github.com/livekit/client-sdk-flutter
2020

2121
environment:

0 commit comments

Comments
 (0)