From fad30689b4ead7cf2168304752ea8b19ce851d30 Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Tue, 28 May 2024 16:57:40 +0200 Subject: [PATCH] Fix outgoing video call --- Linphone/TelecomManager/ProviderDelegate.swift | 2 +- Linphone/TelecomManager/TelecomManager.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Linphone/TelecomManager/ProviderDelegate.swift b/Linphone/TelecomManager/ProviderDelegate.swift index 1c7fb444e..7a56be324 100644 --- a/Linphone/TelecomManager/ProviderDelegate.swift +++ b/Linphone/TelecomManager/ProviderDelegate.swift @@ -329,7 +329,7 @@ extension ProviderDelegate: CXProviderDelegate { CoreContext.shared.doOnCoreQueue { core in do { core.configureAudioSession() - try TelecomManager.shared.doCall(core: core, addr: addr!, isSas: callInfo?.sasEnabled ?? false, isVideo: ((callInfo?.videoEnabled ?? false) && core.videoPreviewEnabled), isConference: callInfo?.isConference ?? false) + try TelecomManager.shared.doCall(core: core, addr: addr!, isSas: callInfo?.sasEnabled ?? false, isVideo: callInfo?.videoEnabled ?? false, isConference: callInfo?.isConference ?? false) action.fulfill() } catch { Log.info("CallKit: Call started failed because \(error)") diff --git a/Linphone/TelecomManager/TelecomManager.swift b/Linphone/TelecomManager/TelecomManager.swift index 38c0a2e16..f31aaf261 100644 --- a/Linphone/TelecomManager/TelecomManager.swift +++ b/Linphone/TelecomManager/TelecomManager.swift @@ -239,7 +239,7 @@ class TelecomManager: ObservableObject { if isConference { lcallParams.videoEnabled = true - lcallParams.videoDirection = isVideo ? MediaDirection.SendRecv : MediaDirection.RecvOnly + lcallParams.videoDirection = isVideo && core.videoPreviewEnabled ? MediaDirection.SendRecv : MediaDirection.RecvOnly /* if (ConferenceWaitingRoomViewModel.sharedModel.joinLayout.value! != .AudioOnly) { lcallParams.videoEnabled = true lcallParams.videoDirection = ConferenceWaitingRoomViewModel.sharedModel.isVideoEnabled.value == true ? .SendRecv : .RecvOnly