Skip to content

Commit 23dd763

Browse files
authored
ios,android: update libwebrtc to m137 (#44)
* ios,android: update libwebrtc to m137 * ios: fix compile * android: fix compile
1 parent 92892bf commit 23dd763

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ android {
3131

3232
dependencies {
3333
implementation "com.facebook.react:react-android:+"
34-
api 'io.github.webrtc-sdk:android:125.6422.04'
34+
api 'io.github.webrtc-sdk:android:137.7151.01'
3535
implementation "androidx.core:core:1.7.0"
3636
}

android/src/main/java/com/oney/WebRTCModule/RTCFrameCryptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ private FrameCryptorAlgorithm frameCryptorAlgorithmFromInt(int algorithm) {
8383
switch (algorithm) {
8484
case 0:
8585
return FrameCryptorAlgorithm.AES_GCM;
86-
case 1:
87-
return FrameCryptorAlgorithm.AES_CBC;
86+
// case 1:
87+
// return FrameCryptorAlgorithm.AES_CBC;
8888
default:
8989
return FrameCryptorAlgorithm.AES_GCM;
9090
}

ios/RCTWebRTC/WebRTCModule+RTCFrameCryptor.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -460,21 +460,21 @@ - (nullable RTCFrameCryptorKeyProvider *)getKeyProviderForId:(NSString *)keyProv
460460
resolve(@{@"result" : @"success"});
461461
}
462462

463-
- (NSString *)stringFromState:(FrameCryptionState)state {
463+
- (NSString *)stringFromState:(RTCFrameCryptorState)state {
464464
switch (state) {
465-
case FrameCryptionStateNew:
465+
case RTCFrameCryptorStateNew:
466466
return @"new";
467-
case FrameCryptionStateOk:
467+
case RTCFrameCryptorStateOk:
468468
return @"ok";
469-
case FrameCryptionStateEncryptionFailed:
469+
case RTCFrameCryptorStateEncryptionFailed:
470470
return @"encryptionFailed";
471-
case FrameCryptionStateDecryptionFailed:
471+
case RTCFrameCryptorStateDecryptionFailed:
472472
return @"decryptionFailed";
473-
case FrameCryptionStateMissingKey:
473+
case RTCFrameCryptorStateMissingKey:
474474
return @"missingKey";
475-
case FrameCryptionStateKeyRatcheted:
475+
case RTCFrameCryptorStateKeyRatcheted:
476476
return @"keyRatcheted";
477-
case FrameCryptionStateInternalError:
477+
case RTCFrameCryptorStateInternalError:
478478
return @"internalError";
479479
default:
480480
return @"unknown";
@@ -485,7 +485,7 @@ - (NSString *)stringFromState:(FrameCryptionState)state {
485485

486486
- (void)frameCryptor:(RTC_OBJC_TYPE(RTCFrameCryptor) *)frameCryptor
487487
didStateChangeWithParticipantId:(NSString *)participantId
488-
withState:(FrameCryptionState)stateChanged {
488+
withState:(RTCFrameCryptorState)stateChanged {
489489
id frameCryptorId = objc_getAssociatedObject(frameCryptor, &frameCryptorUUIDKey);
490490

491491
if (![frameCryptorId isKindOfClass:[NSString class]]) {

ios/RCTWebRTC/WebRTCModule.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ - (instancetype)init {
7777
}
7878
RCTLogInfo(@"Using audio processing module: %@", NSStringFromClass([audioProcessingModule class]));
7979
_peerConnectionFactory =
80-
[[RTCPeerConnectionFactory alloc] initWithBypassVoiceProcessing:NO
80+
[[RTCPeerConnectionFactory alloc] initWithAudioDeviceModuleType:RTCAudioDeviceModuleTypeAudioEngine
81+
bypassVoiceProcessing:NO
8182
encoderFactory:encoderFactory
8283
decoderFactory:decoderFactory
8384
audioProcessingModule:audioProcessingModule];

livekit-react-native-webrtc.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
1919
s.libraries = 'c', 'sqlite3', 'stdc++'
2020
s.framework = 'AudioToolbox','AVFoundation', 'CoreAudio', 'CoreGraphics', 'CoreVideo', 'GLKit', 'VideoToolbox'
2121
s.dependency 'React-Core'
22-
s.dependency 'WebRTC-SDK', '=125.6422.07'
22+
s.dependency 'WebRTC-SDK', '=137.7151.02'
2323

2424
# Swift/Objective-C compatibility
2525
s.pod_target_xcconfig = {

0 commit comments

Comments
 (0)