From ec842f28302e8f433c7c74b15389ed29d47b83bc Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Mon, 6 May 2024 10:38:49 +0200 Subject: [PATCH] Set default front camera --- Linphone/TelecomManager/TelecomManager.swift | 5 +++++ .../UI/Call/ViewModel/MeetingWaitingRoomViewModel.swift | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Linphone/TelecomManager/TelecomManager.swift b/Linphone/TelecomManager/TelecomManager.swift index b51064db2..7f788753a 100644 --- a/Linphone/TelecomManager/TelecomManager.swift +++ b/Linphone/TelecomManager/TelecomManager.swift @@ -620,6 +620,11 @@ class TelecomManager: ObservableObject { //if core.callsNb == 0 { DispatchQueue.main.async { if core.callsNb == 0 { + do { + try core.setVideodevice(newValue: "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:1") + } catch _ { + + } withAnimation { self.outgoingCallStarted = false self.callInProgress = false diff --git a/Linphone/UI/Call/ViewModel/MeetingWaitingRoomViewModel.swift b/Linphone/UI/Call/ViewModel/MeetingWaitingRoomViewModel.swift index dd1beeaf8..080d9897e 100644 --- a/Linphone/UI/Call/ViewModel/MeetingWaitingRoomViewModel.swift +++ b/Linphone/UI/Call/ViewModel/MeetingWaitingRoomViewModel.swift @@ -54,6 +54,12 @@ class MeetingWaitingRoomViewModel: ObservableObject { let conf = core.findConferenceInformationFromUri(uri: self.telecomManager.meetingWaitingRoomSelected!) + do { + try core.setVideodevice(newValue: "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:1") + } catch _ { + + } + if conf != nil && conf!.uri != nil { let confNameTmp = conf?.subject ?? "Conference" var userNameTmp = "" @@ -129,7 +135,6 @@ class MeetingWaitingRoomViewModel: ObservableObject { DispatchQueue.main.async { self.videoDisplayed = true } - self.videoDisplayed = true core.videoPreviewEnabled = true } }