Compare commits

...

4 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
017b749b09 chore(sdk,version) sdk 3.8.1 2021-08-19 17:17:39 +02:00
Saúl Ibarra Corretgé
70ed3c1bc9 fix(ios) fix conference failing when proximity sensor is near
React Native links timers to the display, so they cannot run when the display is
not running. Builtin timers already take being in the background into account,
but not the proximity sensor.

Credits: https://github.com/react-native-webrtc/react-native-callkeep/issues/143

Fixes: https://github.com/jitsi/jitsi-meet/issues/9619
2021-08-19 17:17:14 +02:00
Saúl Ibarra Corretgé
1437b4f187 fix(AudioRoutePickerDialog) add proper margin 2021-08-19 17:17:14 +02:00
Saúl Ibarra Corretgé
0627036e7f fix(ios) fix deadlock when selecting audio device
In WebRTC M92 the RTCAudioSession lock changed from a recursive one to a regular
mutex one, so make sure we don't attempt to lock it  while already holding the
lock.
2021-08-19 17:17:14 +02:00
5 changed files with 48 additions and 7 deletions

View File

@@ -26,4 +26,4 @@ android.useAndroidX=true
android.enableJetifier=true
appVersion=21.3.0
sdkVersion=3.8.0
sdkVersion=3.8.1

View File

@@ -125,12 +125,19 @@ RCT_EXPORT_MODULE();
return _workerQueue;
}
- (BOOL)setConfigWithoutLock:(RTCAudioSessionConfiguration *)config
error:(NSError * _Nullable *)outError {
RTCAudioSession *session = [RTCAudioSession sharedInstance];
return [session setConfiguration:config error:outError];
}
- (BOOL)setConfig:(RTCAudioSessionConfiguration *)config
error:(NSError * _Nullable *)outError {
RTCAudioSession *session = [RTCAudioSession sharedInstance];
[session lockForConfiguration];
BOOL success = [session setConfiguration:config error:outError];
BOOL success = [self setConfigWithoutLock:config error:outError];
[session unlockForConfiguration];
return success;
@@ -196,7 +203,7 @@ RCT_EXPORT_METHOD(setAudioDevice:(NSString *)device
break;
}
}
if (port != nil) {
// First remove the override if we are going to select a different device.
if (isSpeakerOn) {
@@ -206,11 +213,11 @@ RCT_EXPORT_METHOD(setAudioDevice:(NSString *)device
// Special case for the earpiece.
if ([port.portType isEqualToString:AVAudioSessionPortBuiltInMic]) {
forceEarpiece = YES;
[self setConfig:earpieceConfig error:nil];
[self setConfigWithoutLock:earpieceConfig error:nil];
} else if (isEarpieceOn) {
// Reset the config.
RTCAudioSessionConfiguration *config = [self configForMode:activeMode];
[self setConfig:config error:nil];
[self setConfigWithoutLock:config error:nil];
}
// Select our preferred input.

View File

@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.8.0</string>
<string>3.8.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>

View File

@@ -11,6 +11,39 @@ index bd48f44..d243ed0 100644
withDispatchGroup:(dispatch_group_t)dispatchGroup
lazilyDiscovered:(BOOL)lazilyDiscovered
{
diff --git a/node_modules/react-native/React/Modules/RCTTiming.m b/node_modules/react-native/React/Modules/RCTTiming.m
index 8a09022..265d7b6 100644
--- a/node_modules/react-native/React/Modules/RCTTiming.m
+++ b/node_modules/react-native/React/Modules/RCTTiming.m
@@ -130,6 +130,11 @@ - (void)setBridge:(RCTBridge *)bridge
object:nil];
}
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(proximityChanged)
+ name:UIDeviceProximityStateDidChangeNotification
+ object:nil];
+
_bridge = bridge;
}
@@ -276,6 +281,16 @@ - (void)didUpdateFrame:(RCTFrameUpdate *)update
}
}
+-(void)proximityChanged
+{
+ BOOL near = [UIDevice currentDevice].proximityState;
+ if (near) {
+ [self appDidMoveToBackground];
+ } else {
+ [self appDidMoveToForeground];
+ }
+}
+
- (void)scheduleSleepTimer:(NSDate *)sleepTarget
{
@synchronized (self) {
diff --git a/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm b/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm
index 3cb73b5..e4a14b4 100644
--- a/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm

View File

@@ -17,7 +17,8 @@ export default createStyleSheet({
deviceRow: {
alignItems: 'center',
flexDirection: 'row',
height: MD_ITEM_HEIGHT
height: MD_ITEM_HEIGHT,
marginLeft: 16
},
/**