mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
Enable camera in background context when app goes in background
This commit is contained in:
parent
0fc1f024d3
commit
b63779b65e
2 changed files with 3 additions and 3 deletions
|
|
@ -131,7 +131,7 @@
|
|||
const LinphoneCallParams *params =
|
||||
linphone_call_get_current_params(call);
|
||||
if (linphone_call_params_video_enabled(params)) {
|
||||
linphone_call_enable_camera(call, [CallManager.instance backgroundContextCameraIsEnabled] || (linphone_call_get_call_log(call) && linphone_call_log_was_conference(linphone_call_get_call_log(call))));
|
||||
linphone_call_enable_camera(call, [CallManager.instance backgroundContextCameraIsEnabled]);
|
||||
}
|
||||
[CallManager.instance setBackgroundContextCallWithCall:nil];
|
||||
} else if (linphone_call_get_state(call) == LinphoneCallIncomingReceived) {
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@ extension ProviderDelegate: CXProviderDelegate {
|
|||
|
||||
if (UIApplication.shared.applicationState != .active) {
|
||||
CallManager.instance().backgroundContextCall = call
|
||||
CallManager.instance().backgroundContextCameraIsEnabled = call!.params?.videoEnabled ?? false
|
||||
call?.cameraEnabled = false // Disable camera while app is not on foreground
|
||||
CallManager.instance().backgroundContextCameraIsEnabled = call.params?.videoEnabled == true || call.callLog?.wasConference() == true
|
||||
call.cameraEnabled = false // Disable camera while app is not on foreground
|
||||
}
|
||||
CallManager.instance().callkitAudioSessionActivated = false
|
||||
CallManager.instance().lc?.configureAudioSession()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue