From c101c7d3ddab4c8319dbc79b59de78f56e38e4f8 Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Tue, 7 Oct 2025 14:32:23 +0200 Subject: [PATCH 01/13] pin to the 137 releases --- android/build.gradle | 2 +- stream-react-native-webrtc.podspec | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8fb77658e..bbc6eb842 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -85,7 +85,7 @@ def kotlin_version = getExtOrDefault('kotlinVersion', '1.8.10') println "Building Stream WebRTC React Native module with Kotlin version: $kotlin_version" dependencies { - api 'io.getstream:stream-webrtc-android:1.3.10-SNAPSHOT' + api 'io.getstream:stream-video-webrtc-android:137.0.1' implementation 'com.facebook.react:react-native:+' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "androidx.core:core:1.7.0" diff --git a/stream-react-native-webrtc.podspec b/stream-react-native-webrtc.podspec index b182fe609..f893031f4 100644 --- a/stream-react-native-webrtc.podspec +++ b/stream-react-native-webrtc.podspec @@ -2,6 +2,9 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) +# WebRTC version from stream-video-swift-webrtc releases +webrtc_version = '137.0.54' + Pod::Spec.new do |s| s.name = 'stream-react-native-webrtc' s.version = package['version'] @@ -19,7 +22,12 @@ Pod::Spec.new do |s| s.libraries = 'c', 'sqlite3', 'stdc++' s.framework = 'AudioToolbox','AVFoundation', 'CoreAudio', 'CoreGraphics', 'CoreVideo', 'GLKit', 'VideoToolbox' s.dependency 'React-Core' - s.dependency 'StreamWebRTC', '~>125.6422.070' + + s.prepare_command = <<-CMD + curl -sL "https://github.com/GetStream/stream-video-swift-webrtc/releases/download/#{webrtc_version}/WebRTC.xcframework.zip" -o w.zip && unzip -oq w.zip && rm w.zip + CMD + + s.vendored_frameworks = 'WebRTC.xcframework' # Swift/Objective-C compatibility #https://blog.cocoapods.org/CocoaPods-1.5.0/ s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' From 5fda17efa4676d96f8c918da3dc3f807be2710d5 Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Tue, 7 Oct 2025 14:32:33 +0200 Subject: [PATCH 02/13] 137.0.0-alpha.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 154104b5b..59db7244e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stream-io/react-native-webrtc", - "version": "125.4.4", + "version": "137.0.0-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@stream-io/react-native-webrtc", - "version": "125.4.4", + "version": "137.0.0-alpha.1", "license": "MIT", "dependencies": { "base64-js": "1.5.1", diff --git a/package.json b/package.json index 9e5d4ee69..b0a5114c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/react-native-webrtc", - "version": "125.4.4", + "version": "137.0.0-alpha.1", "repository": { "type": "git", "url": "git+https://github.com/GetStream/react-native-webrtc.git" From a87bd13a6644947aedbc5cdd4b7297f8824c339f Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Tue, 7 Oct 2025 21:57:46 +0200 Subject: [PATCH 03/13] update init with the new api interface --- ios/RCTWebRTC/WebRTCModule.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ios/RCTWebRTC/WebRTCModule.m b/ios/RCTWebRTC/WebRTCModule.m index c025b3bd6..3ceed431f 100644 --- a/ios/RCTWebRTC/WebRTCModule.m +++ b/ios/RCTWebRTC/WebRTCModule.m @@ -77,10 +77,12 @@ - (instancetype)init { NSLog(@"Both audioProcessingModule and audioDevice are provided, but only one can be used. Ignoring audioDevice."); } RCTLogInfo(@"Using audio processing module: %@", NSStringFromClass([audioProcessingModule class])); - _peerConnectionFactory = [[RTCPeerConnectionFactory alloc] initWithBypassVoiceProcessing:NO - encoderFactory:encoderFactory - decoderFactory:decoderFactory - audioProcessingModule:audioProcessingModule]; + _peerConnectionFactory = + [[RTCPeerConnectionFactory alloc] initWithAudioDeviceModuleType:RTCAudioDeviceModuleTypeAudioEngine + bypassVoiceProcessing:NO + encoderFactory:encoderFactory + decoderFactory:decoderFactory + audioProcessingModule:audioProcessingModule]; } else { RCTLogInfo(@"Using audio device: %@", NSStringFromClass([audioDevice class])); _peerConnectionFactory = [[RTCPeerConnectionFactory alloc] initWithEncoderFactory:encoderFactory From 5a913f2e1ca94a5c64068d11ae81e8473f465255 Mon Sep 17 00:00:00 2001 From: davidliu Date: Sat, 9 Aug 2025 16:45:07 +0900 Subject: [PATCH 04/13] android: add jni_zero to consumer rules (#47) # Conflicts: # android/consumer-rules.pro --- android/consumer-rules.pro | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 android/consumer-rules.pro diff --git a/android/consumer-rules.pro b/android/consumer-rules.pro new file mode 100644 index 000000000..daa84a255 --- /dev/null +++ b/android/consumer-rules.pro @@ -0,0 +1,3 @@ +# WebRTC +-keep class org.webrtc.** { *; } +-keep class org.jni_zero.** { *; } From 5a24ad41f3772b9408b435a694083a0b81cda7f0 Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Wed, 8 Oct 2025 16:26:25 +0200 Subject: [PATCH 05/13] 137.0.0-alpha.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 59db7244e..3cd46981b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.1", + "version": "137.0.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.1", + "version": "137.0.0-alpha.2", "license": "MIT", "dependencies": { "base64-js": "1.5.1", diff --git a/package.json b/package.json index b0a5114c3..e9ddfb22f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.1", + "version": "137.0.0-alpha.2", "repository": { "type": "git", "url": "git+https://github.com/GetStream/react-native-webrtc.git" From 21902dfb3a853926ab5a6e420fd8aacf01ae30ac Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Wed, 22 Oct 2025 21:34:56 +0200 Subject: [PATCH 06/13] add consumer proguard files --- android/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index bbc6eb842..9a845dc9a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -70,6 +70,7 @@ android { targetSdkVersion safeExtGet('targetSdkVersion', 24) versionCode 1 versionName "1.0" + consumerProguardFiles 'consumer-rules.pro' } // WebRTC requires Java 8 features @@ -86,7 +87,7 @@ println "Building Stream WebRTC React Native module with Kotlin version: $kotlin dependencies { api 'io.getstream:stream-video-webrtc-android:137.0.1' - implementation 'com.facebook.react:react-native:+' + implementation "com.facebook.react:react-android:+" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "androidx.core:core:1.7.0" } From ed24dd4f2581e7e69cdbb53a8ac290a8ccd5abbf Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Wed, 22 Oct 2025 21:37:46 +0200 Subject: [PATCH 07/13] 137.0.0-alpha.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3cd46981b..ba2696611 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.2", + "version": "137.0.0-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.2", + "version": "137.0.0-alpha.3", "license": "MIT", "dependencies": { "base64-js": "1.5.1", diff --git a/package.json b/package.json index e9ddfb22f..0d7d7d25d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.2", + "version": "137.0.0-alpha.3", "repository": { "type": "git", "url": "git+https://github.com/GetStream/react-native-webrtc.git" From 0c72e56c81e740346f4cec56ff8504a5e984f52f Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Wed, 29 Oct 2025 15:55:11 +0100 Subject: [PATCH 08/13] Fix]Performance issue on iOS due to MetalView scale calculation --- stream-react-native-webrtc.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream-react-native-webrtc.podspec b/stream-react-native-webrtc.podspec index f893031f4..8c5605ed6 100644 --- a/stream-react-native-webrtc.podspec +++ b/stream-react-native-webrtc.podspec @@ -3,7 +3,7 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) # WebRTC version from stream-video-swift-webrtc releases -webrtc_version = '137.0.54' +webrtc_version = '137.0.42' Pod::Spec.new do |s| s.name = 'stream-react-native-webrtc' From a24dfc139f5cdcacdb679b32a47c7a20deefb932 Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Wed, 29 Oct 2025 15:55:46 +0100 Subject: [PATCH 09/13] 137.0.0-alpha.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba2696611..e7b60bb00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.3", + "version": "137.0.0-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.3", + "version": "137.0.0-alpha.4", "license": "MIT", "dependencies": { "base64-js": "1.5.1", diff --git a/package.json b/package.json index 0d7d7d25d..b345ac241 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.3", + "version": "137.0.0-alpha.4", "repository": { "type": "git", "url": "git+https://github.com/GetStream/react-native-webrtc.git" From 93bb08e52fcf8057e8e5ff6a904b6229f1b1036f Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Thu, 30 Oct 2025 12:16:13 +0100 Subject: [PATCH 10/13] fix: initialise peer connection with nil audioProcessingModule and use RTCAudioDeviceModuleTypePlatformDefault for now --- ios/RCTWebRTC/WebRTCModule.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ios/RCTWebRTC/WebRTCModule.m b/ios/RCTWebRTC/WebRTCModule.m index 3ceed431f..bef9e5c17 100644 --- a/ios/RCTWebRTC/WebRTCModule.m +++ b/ios/RCTWebRTC/WebRTCModule.m @@ -78,16 +78,23 @@ - (instancetype)init { } RCTLogInfo(@"Using audio processing module: %@", NSStringFromClass([audioProcessingModule class])); _peerConnectionFactory = - [[RTCPeerConnectionFactory alloc] initWithAudioDeviceModuleType:RTCAudioDeviceModuleTypeAudioEngine + [[RTCPeerConnectionFactory alloc] initWithAudioDeviceModuleType:RTCAudioDeviceModuleTypePlatformDefault bypassVoiceProcessing:NO encoderFactory:encoderFactory decoderFactory:decoderFactory audioProcessingModule:audioProcessingModule]; - } else { - RCTLogInfo(@"Using audio device: %@", NSStringFromClass([audioDevice class])); + } else if (audioDevice != nil) { + RCTLogInfo(@"Using custom audio device: %@", NSStringFromClass([audioDevice class])); _peerConnectionFactory = [[RTCPeerConnectionFactory alloc] initWithEncoderFactory:encoderFactory decoderFactory:decoderFactory audioDevice:audioDevice]; + } else { + _peerConnectionFactory = + [[RTCPeerConnectionFactory alloc] initWithAudioDeviceModuleType:RTCAudioDeviceModuleTypePlatformDefault + bypassVoiceProcessing:NO + encoderFactory:encoderFactory + decoderFactory:decoderFactory + audioProcessingModule:nil]; } _peerConnections = [NSMutableDictionary new]; From 2c983643514204160e8e414350d61ed8e9066dc9 Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Thu, 30 Oct 2025 12:17:45 +0100 Subject: [PATCH 11/13] 137.0.0-alpha.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e7b60bb00..5fabac611 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.4", + "version": "137.0.0-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.4", + "version": "137.0.0-alpha.5", "license": "MIT", "dependencies": { "base64-js": "1.5.1", diff --git a/package.json b/package.json index b345ac241..056bf0075 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.4", + "version": "137.0.0-alpha.5", "repository": { "type": "git", "url": "git+https://github.com/GetStream/react-native-webrtc.git" From 6476119456005dc35ba00e9bf4d4c4124c6066e8 Mon Sep 17 00:00:00 2001 From: davidliu Date: Sat, 9 Aug 2025 16:56:37 +0900 Subject: [PATCH 12/13] ios,android: handle internal audio media constraints (#46) * android: handle media constraints for m137 * ios: handle audio media constraints * fixes --- .../oney/WebRTCModule/GetUserMediaImpl.java | 18 +++++++++++++ ios/RCTWebRTC/WebRTCModule+RTCMediaStream.m | 25 ++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java b/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java index ede36d2ac..861919513 100644 --- a/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java +++ b/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java @@ -111,6 +111,24 @@ private AudioTrack createAudioTrack(ReadableMap constraints) { PeerConnectionFactory pcFactory = webRTCModule.mFactory; MediaConstraints peerConstraints = webRTCModule.constraintsForOptions(audioConstraintsMap); + // Convert given constraints into the internal webrtc media constraints. + peerConstraints.optional.add(new MediaConstraints.KeyValuePair("googAutoGainControl", + audioConstraintsMap.hasKey("autoGainControl") + ? ReactBridgeUtil.getMapStrValue(audioConstraintsMap, "autoGainControl") + : "true")); + peerConstraints.optional.add(new MediaConstraints.KeyValuePair("googNoiseSuppression", + audioConstraintsMap.hasKey("noiseSuppression") + ? ReactBridgeUtil.getMapStrValue(audioConstraintsMap, "noiseSuppression") + : "true")); + peerConstraints.optional.add(new MediaConstraints.KeyValuePair("googEchoCancellation", + audioConstraintsMap.hasKey("echoCancellation") + ? ReactBridgeUtil.getMapStrValue(audioConstraintsMap, "echoCancellation") + : "true")); + peerConstraints.optional.add(new MediaConstraints.KeyValuePair("googHighpassFilter", + audioConstraintsMap.hasKey("highpassFilter") + ? ReactBridgeUtil.getMapStrValue(audioConstraintsMap, "highpassFilter") + : "true")); + // PeerConnectionFactory.createAudioSource will throw an error when mandatory constraints contain nulls. // so, let's check for nulls checkMandatoryConstraints(peerConstraints); diff --git a/ios/RCTWebRTC/WebRTCModule+RTCMediaStream.m b/ios/RCTWebRTC/WebRTCModule+RTCMediaStream.m index 3d730a83f..e3e52ab3a 100644 --- a/ios/RCTWebRTC/WebRTCModule+RTCMediaStream.m +++ b/ios/RCTWebRTC/WebRTCModule+RTCMediaStream.m @@ -32,6 +32,10 @@ - (void)setVideoEffectProcessor:(VideoEffectProcessor *)videoEffectProcessor #pragma mark - getUserMedia +- (NSString *)convertBoolToString:(id)value { + return value ? @"true" : @"false"; +} + /** * Initializes a new {@link RTCAudioTrack} which satisfies the given constraints. * @@ -40,7 +44,26 @@ - (void)setVideoEffectProcessor:(VideoEffectProcessor *)videoEffectProcessor */ - (RTCAudioTrack *)createAudioTrack:(NSDictionary *)constraints { NSString *trackId = [[NSUUID UUID] UUIDString]; - RTCAudioTrack *audioTrack = [self.peerConnectionFactory audioTrackWithTrackId:trackId]; + NSDictionary *audioConstraints = constraints[@"audio"]; + NSMutableDictionary *optionalConstraints = [NSMutableDictionary dictionary]; + optionalConstraints[@"googAutoGainControl"] = audioConstraints[@"autoGainControl"] != nil + ? [self convertBoolToString:audioConstraints[@"autoGainControl"]] + : @"true"; + optionalConstraints[@"googNoiseSuppression"] = + audioConstraints[@"noiseSuppression"] != nil ? [self convertBoolToString:audioConstraints[@"noiseSuppression"]] + : @"true"; + optionalConstraints[@"googEchoCancellation"] = + audioConstraints[@"echoCancellation"] != nil ? [self convertBoolToString:audioConstraints[@"echoCancellation"]] + : @"true"; + optionalConstraints[@"googHighpassFilter"] = audioConstraints[@"highpassFilter"] != nil + ? [self convertBoolToString:audioConstraints[@"highpassFilter"]] + : @"true"; + + RTCMediaConstraints *mediaConstraints = + [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil optionalConstraints:optionalConstraints]; + + RTCAudioSource *audioSource = [self.peerConnectionFactory audioSourceWithConstraints:mediaConstraints]; + RTCAudioTrack *audioTrack = [self.peerConnectionFactory audioTrackWithSource:audioSource trackId:trackId]; return audioTrack; } /** From 8931c47f34d3ea3052b84cff96b84a4b1404e341 Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Fri, 31 Oct 2025 16:46:29 +0100 Subject: [PATCH 13/13] 137.0.0-alpha.6 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5fabac611..1fd7a8ff2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.5", + "version": "137.0.0-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.5", + "version": "137.0.0-alpha.6", "license": "MIT", "dependencies": { "base64-js": "1.5.1", diff --git a/package.json b/package.json index 056bf0075..3638fe7b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.0.0-alpha.5", + "version": "137.0.0-alpha.6", "repository": { "type": "git", "url": "git+https://github.com/GetStream/react-native-webrtc.git"