From 5d5d4d39413f1a2fdfe01b886be0fe581638ed72 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 15 Nov 2022 17:22:35 +0100 Subject: [PATCH] Allow to activate camera on audio-only from the call window. --- linphone-app/ui/views/App/Calls/Incall.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/linphone-app/ui/views/App/Calls/Incall.qml b/linphone-app/ui/views/App/Calls/Incall.qml index cd616f849..4354dc512 100644 --- a/linphone-app/ui/views/App/Calls/Incall.qml +++ b/linphone-app/ui/views/App/Calls/Incall.qml @@ -489,14 +489,26 @@ Rectangle { backgroundRadius: 90 colorSet: callModel && callModel.cameraEnabled ? IncallStyle.buttons.cameraOn : IncallStyle.buttons.cameraOff updating: callModel.videoEnabled && callModel.updating - enabled: !mainItem.isAudioOnly + property bool _activateCamera: false onClicked: if(callModel){ if( callModel.isConference){// Only deactivate camera in conference. - callModel.cameraEnabled = !callModel.cameraEnabled + if(mainItem.isAudioOnly && SettingsModel.videoConferenceLayout != 2) { + camera._activateCamera = true + conferenceLayout.item.clearAll(SettingsModel.videoConferenceLayout) + callModel.conferenceVideoLayout = SettingsModel.videoConferenceLayout + }else + callModel.cameraEnabled = !callModel.cameraEnabled }else{// In one-one, we deactivate all videos. callModel.videoEnabled = !callModel.videoEnabled } } + Connections{// Enable camera only when status is ok + target: callModel + onStatusChanged: if( camera._activateCamera && (status == LinphoneEnums.CallStatusConnected || status == LinphoneEnums.CallStatusIdle)){ + camera._activateCamera = false + callModel.cameraEnabled = true + } + } } }