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.
This commit is contained in:
Julien Wadel 2022-10-05 12:11:08 +02:00
parent 15baf63a7e
commit d73a73e2b3
5 changed files with 18 additions and 1 deletions

View file

@ -19,6 +19,7 @@
<entry name="refkey" overwrite="true"></entry>
<entry name="realm" overwrite="true"></entry>
<entry name="conference_factory_uri" overwrite="true"></entry>
<entry name="audio_video_conference_factory_uri" overwrite="true"></entry>
<entry name="lime_server_url" overwrite="true"></entry>
</section>
<section name="nat_policy_default_values">

View file

@ -297,6 +297,19 @@ void ConferenceInfoModel::setConferenceInfo(std::shared_ptr<linphone::Conference
//-------------------------------------------------------------------------------------------------
void ConferenceInfoModel::resetConferenceInfo() {
mConferenceInfo = linphone::Factory::get()->createConferenceInfo();
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<linphone::Core> core = CoreManager::getInstance()->getCore();

View file

@ -90,6 +90,7 @@ public:
void setConferenceInfo(std::shared_ptr<linphone::ConferenceInfo> 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

View file

@ -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){

View file

@ -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)