From d73a73e2b3b55d02e1be75935bb482bcd1891eb0 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 5 Oct 2022 12:11:08 +0200 Subject: [PATCH] On Active speaker, deactivate camera on remote video only if we are not in conference. Reset conference info when calling multiple time the same chat room. Avoid tu use the audio video conference URI on non-Linphone user. --- .../assets/assistant/use-other-sip-account.rc | 1 + .../conferenceInfo/ConferenceInfoModel.cpp | 13 +++++++++++++ .../conferenceInfo/ConferenceInfoModel.hpp | 1 + .../ui/views/App/Calls/IncallActiveSpeaker.qml | 2 +- linphone-app/ui/views/App/Main/Conversation.qml | 2 ++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/linphone-app/assets/assistant/use-other-sip-account.rc b/linphone-app/assets/assistant/use-other-sip-account.rc index 41f9da5e0..228726c84 100644 --- a/linphone-app/assets/assistant/use-other-sip-account.rc +++ b/linphone-app/assets/assistant/use-other-sip-account.rc @@ -19,6 +19,7 @@ +
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp index 70bbec425..a3c3d2406 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp @@ -297,6 +297,19 @@ void ConferenceInfoModel::setConferenceInfo(std::shared_ptrcreateConferenceInfo(); + mConferenceInfo->setDateTime(0); + mConferenceInfo->setDuration(0); + mIsScheduled = false; + auto accountAddress = CoreManager::getInstance()->getCore()->getDefaultAccount()->getContactAddress(); + if(accountAddress){ + auto cleanedClonedAddress = accountAddress->clone(); + cleanedClonedAddress->clean(); + mConferenceInfo->setOrganizer(cleanedClonedAddress); + } +} + void ConferenceInfoModel::createConference(const int& securityLevel) { CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = false; shared_ptr core = CoreManager::getInstance()->getCore(); diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp index 5cd074b14..17087a240 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp @@ -90,6 +90,7 @@ public: void setConferenceInfo(std::shared_ptr conferenceInfo); // Tools + Q_INVOKABLE void resetConferenceInfo();// Recreate a new conference info from factory Q_INVOKABLE void createConference(const int& securityLevel); Q_INVOKABLE void cancelConference(); Q_INVOKABLE void deleteConferenceInfo();// Remove completly this conference info from DB diff --git a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml index 4cd1282d2..25345e99b 100644 --- a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml @@ -63,7 +63,7 @@ Item { anchors.leftMargin: isRightReducedLayout || isLeftReducedLayout? 30 : 140 anchors.rightMargin: isRightReducedLayout ? 10 : 140 callModel: mainItem.callModel - deactivateCamera: (callModel && callModel.pausedByUser) || !mainItem.cameraEnabled || (currentDevice && !currentDevice.videoEnabled) + deactivateCamera: (callModel && callModel.pausedByUser) || !mainItem.cameraEnabled || (!callModel.isConference && currentDevice && !currentDevice.videoEnabled) isPreview: mainItem.showMe && mainItem.participantCount == 1 onIsPreviewChanged: { if( isPreview){ diff --git a/linphone-app/ui/views/App/Main/Conversation.qml b/linphone-app/ui/views/App/Main/Conversation.qml index 49e2403ac..b2cf8b343 100644 --- a/linphone-app/ui/views/App/Main/Conversation.qml +++ b/linphone-app/ui/views/App/Main/Conversation.qml @@ -335,6 +335,7 @@ ColumnLayout { onClicked:{ if( SettingsModel.videoConferenceEnabled ){ groupCallButton.toggled = true + conferenceInfoModel.resetConferenceInfo(); conferenceInfoModel.isScheduled = false conferenceInfoModel.subject = chatRoomModel.subject @@ -497,6 +498,7 @@ ColumnLayout { menuItemStyle : MenuItemStyle.aux2 visible: conversationMenu.showScheduleMeeting onClicked: { + conferenceInfoModel.resetConferenceInfo() conferenceInfoModel.isScheduled = true conferenceInfoModel.subject = chatRoomModel.subject conferenceInfoModel.setParticipants(conversation.chatRoomModel.participants)