Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ android {

dependencies {
implementation "com.facebook.react:react-android:+"
api 'io.github.webrtc-sdk:android-prefixed:144.7559.15'
api 'io.github.webrtc-sdk:android-prefixed:150.7871.01'
implementation "androidx.core:core:1.7.0"
}
8 changes: 8 additions & 0 deletions android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,14 @@ private PeerConnection.RTCConfiguration parseRTCConfiguration(ReadableMap map) {
conf.presumeWritableWhenFullyRelayed = v;
}

// enableSctpSnap (private api)
// Maps to an immutable field of the native configuration, so it must hold the same
// value at peer connection creation and on every setConfiguration call.
if (map.hasKey("enableSctpSnap") && map.getType("enableSctpSnap") == ReadableType.Boolean) {
final boolean v = map.getBoolean("enableSctpSnap");
conf.enableSctpSnap = v;
}

return conf;
}

Expand Down
8 changes: 4 additions & 4 deletions examples/GumTestApp/ios/GumTestApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-GumTestApp/Pods-GumTestApp-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/WebRTC-SDK/WebRTC.framework/WebRTC",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/LiveKitWebRTC/LiveKitWebRTC.framework/LiveKitWebRTC",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LiveKitWebRTC.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -460,12 +460,12 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-GumTestApp-GumTestAppTests/Pods-GumTestApp-GumTestAppTests-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/WebRTC-SDK/WebRTC.framework/WebRTC",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/LiveKitWebRTC/LiveKitWebRTC.framework/LiveKitWebRTC",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LiveKitWebRTC.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
5 changes: 5 additions & 0 deletions examples/GumTestApp/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
platform :ios, 13.0
prepare_react_native_project!

# LiveKitWebRTC 150.7871.x has not reached the CocoaPods trunk CDN yet, so the
# livekit/podspecs repository is needed as an additional source.
source 'https://cdn.cocoapods.org/'
source 'https://github.com/livekit/podspecs.git'

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
Expand Down
6 changes: 6 additions & 0 deletions ios/RCTWebRTC/RCTConvert+WebRTC.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ + (nonnull LKRTCConfiguration *)LKRTCConfiguration:(id)json {

// Enable GCM ciphers.
LKRTCCryptoOptions *cryptoOptions = [[LKRTCCryptoOptions alloc] initWithSrtpEnableGcmCryptoSuites:YES
srtpPreferGcmCryptoSuites:NO
srtpEnableAes128Sha1_32CryptoCipher:NO
srtpEnableAes128Sha1_80CryptoCipher:YES
srtpEnableEncryptedRtpHeaderExtensions:NO
sframeRequireFrameEncryption:NO];
config.cryptoOptions = cryptoOptions;
Expand Down Expand Up @@ -122,6 +124,10 @@ + (nonnull LKRTCConfiguration *)LKRTCConfiguration:(id)json {
}
}

if (json[@"enableSctpSnap"] != nil && [json[@"enableSctpSnap"] isKindOfClass:[NSNumber class]]) {
config.enableSctpSnap = [RCTConvert BOOL:json[@"enableSctpSnap"]];
}

if (json[@"iceBackupCandidatePairPingInterval"] != nil &&
[json[@"iceBackupCandidatePairPingInterval"] isKindOfClass:[NSNumber class]]) {
config.iceBackupCandidatePairPingInterval = [RCTConvert int:json[@"iceBackupCandidatePairPingInterval"]];
Expand Down
2 changes: 1 addition & 1 deletion livekit-react-native-webrtc.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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 'LiveKitWebRTC', '= 144.7559.15'
s.dependency 'LiveKitWebRTC', '= 150.7871.02'

# Swift/Objective-C compatibility
s.pod_target_xcconfig = {
Expand Down
1 change: 1 addition & 0 deletions src/RTCPeerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type RTCIceServer = {

type RTCConfiguration = {
bundlePolicy?: 'balanced' | 'max-compat' | 'max-bundle',
enableSctpSnap?: boolean,
iceCandidatePoolSize?: number,
iceServers?: RTCIceServer[],
iceTransportPolicy?: 'all' | 'relay',
Expand Down
Loading