diff --git a/linphone-app/src/components/conference/ConferenceListener.cpp b/linphone-app/src/components/conference/ConferenceListener.cpp index 612821117..32a5a55f1 100644 --- a/linphone-app/src/components/conference/ConferenceListener.cpp +++ b/linphone-app/src/components/conference/ConferenceListener.cpp @@ -62,6 +62,10 @@ void ConferenceListener::onParticipantDeviceRemoved(const std::shared_ptrgetMe()->getDevices().size(); emit participantDeviceRemoved(participantDevice); } +void ConferenceListener::onParticipantDeviceStateChanged(const std::shared_ptr & conference, const std::shared_ptr & device, linphone::ParticipantDeviceState state) { + qDebug() << "onParticipantDeviceStateChanged: " << device->getAddress()->asString().c_str() << " isInConf?[" << device->isInConference() << "] " << (int)state; + emit participantDeviceStateChanged(conference, device, state); +} void ConferenceListener::onParticipantAdminStatusChanged(const std::shared_ptr & conference, const std::shared_ptr & participant){ qDebug() << "onParticipantAdminStatusChanged"; emit participantAdminStatusChanged(participant); diff --git a/linphone-app/src/components/conference/ConferenceListener.hpp b/linphone-app/src/components/conference/ConferenceListener.hpp index 25b9f06c0..7ad651fb3 100644 --- a/linphone-app/src/components/conference/ConferenceListener.hpp +++ b/linphone-app/src/components/conference/ConferenceListener.hpp @@ -40,6 +40,7 @@ public: virtual void onParticipantAdminStatusChanged(const std::shared_ptr & conference, const std::shared_ptr & participant) override; virtual void onParticipantDeviceAdded(const std::shared_ptr & conference, const std::shared_ptr & participantDevice) override; virtual void onParticipantDeviceRemoved(const std::shared_ptr & conference, const std::shared_ptr & participantDevice) override; + virtual void onParticipantDeviceStateChanged(const std::shared_ptr & conference, const std::shared_ptr & device, linphone::ParticipantDeviceState state) override; virtual void onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & conference, const std::shared_ptr & device) override; virtual void onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & conference, const std::shared_ptr & device) override; virtual void onParticipantDeviceIsSpeakingChanged(const std::shared_ptr & conference, const std::shared_ptr & participantDevice, bool isSpeaking) override; @@ -54,6 +55,7 @@ signals: void participantAdminStatusChanged(const std::shared_ptr & participant); void participantDeviceAdded(const std::shared_ptr & participantDevice); void participantDeviceRemoved(const std::shared_ptr & participantDevice); + void participantDeviceStateChanged(const std::shared_ptr & conference, const std::shared_ptr & device, linphone::ParticipantDeviceState state); void participantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice); void participantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice); void participantDeviceIsSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking); diff --git a/linphone-app/src/components/conference/ConferenceModel.cpp b/linphone-app/src/components/conference/ConferenceModel.cpp index 5f7dfc2d1..fb6d94773 100644 --- a/linphone-app/src/components/conference/ConferenceModel.cpp +++ b/linphone-app/src/components/conference/ConferenceModel.cpp @@ -42,6 +42,7 @@ void ConferenceModel::connectTo(ConferenceListener * listener){ connect(listener, &ConferenceListener::participantAdminStatusChanged, this, &ConferenceModel::onParticipantAdminStatusChanged); connect(listener, &ConferenceListener::participantDeviceAdded, this, &ConferenceModel::onParticipantDeviceAdded); connect(listener, &ConferenceListener::participantDeviceRemoved, this, &ConferenceModel::onParticipantDeviceRemoved); + connect(listener, &ConferenceListener::participantDeviceStateChanged, this, &ConferenceModel::onParticipantDeviceStateChanged); connect(listener, &ConferenceListener::participantDeviceMediaCapabilityChanged, this, &ConferenceModel::onParticipantDeviceMediaCapabilityChanged); connect(listener, &ConferenceListener::participantDeviceMediaAvailabilityChanged, this, &ConferenceModel::onParticipantDeviceMediaAvailabilityChanged); connect(listener, &ConferenceListener::participantDeviceIsSpeakingChanged, this, &ConferenceModel::onParticipantDeviceIsSpeakingChanged); @@ -123,7 +124,7 @@ std::list> ConferenceModel::getParticipan // LINPHONE LISTENERS //----------------------------------------------------------------------------------------------------------------------- void ConferenceModel::onParticipantAdded(const std::shared_ptr & participant){ - qDebug() << "Added call, participant count: " << getParticipantList().size(); + qDebug() << "Added call, participant count: " << getParticipantList().size() << ". Me devices : " << mConference->getMe()->getDevices().size(); updateLocalParticipant(); emit participantAdded(participant); } @@ -147,6 +148,13 @@ void ConferenceModel::onParticipantDeviceRemoved(const std::shared_ptrgetMe()->getDevices().size(); emit participantDeviceRemoved(participantDevice); } + +void ConferenceModel::onParticipantDeviceStateChanged(const std::shared_ptr & conference, const std::shared_ptr & device, linphone::ParticipantDeviceState state){ + qDebug() << "Me devices : " << mConference->getMe()->getDevices().size(); + updateLocalParticipant(); + emit participantDeviceStateChanged(device, state); +} + void ConferenceModel::onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice){ qDebug() << "ConferenceModel::onParticipantDeviceMediaCapabilityChanged: " << (int)participantDevice->getStreamCapability(linphone::StreamType::Video) << ". Me devices : " << mConference->getMe()->getDevices().size(); emit participantDeviceMediaCapabilityChanged(participantDevice); @@ -159,6 +167,7 @@ void ConferenceModel::onParticipantDeviceIsSpeakingChanged(const std::shared_ptr emit participantDeviceIsSpeakingChanged(participantDevice, isSpeaking); } void ConferenceModel::onConferenceStateChanged(linphone::Conference::State newState){ + updateLocalParticipant(); emit conferenceStateChanged(newState); } void ConferenceModel::onSubjectChanged(const std::string& string){ diff --git a/linphone-app/src/components/conference/ConferenceModel.hpp b/linphone-app/src/components/conference/ConferenceModel.hpp index 86197a43e..dc86f8983 100644 --- a/linphone-app/src/components/conference/ConferenceModel.hpp +++ b/linphone-app/src/components/conference/ConferenceModel.hpp @@ -65,6 +65,7 @@ public: virtual void onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & device); virtual void onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & device); virtual void onParticipantDeviceIsSpeakingChanged(const std::shared_ptr & device, bool isSpeaking); + virtual void onParticipantDeviceStateChanged(const std::shared_ptr & conference, const std::shared_ptr & device, linphone::ParticipantDeviceState state); virtual void onConferenceStateChanged(linphone::Conference::State newState); virtual void onSubjectChanged(const std::string& subject); //--------------------------------------------------------------------------- @@ -79,6 +80,7 @@ signals: void participantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice); void participantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice); void participantDeviceIsSpeakingChanged(const std::shared_ptr & device, bool isSpeaking); + void participantDeviceStateChanged(const std::shared_ptr & device, linphone::ParticipantDeviceState state); void conferenceStateChanged(linphone::Conference::State newState); void subjectChanged(); diff --git a/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml b/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml index d69121735..190502e15 100644 --- a/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml +++ b/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml @@ -35,7 +35,7 @@ ColumnLayout { showHeader:false - visible: mainLayout.isAdmin && mainLayout.canHandleParticipants + visible: mainLayout.canHandleParticipants maxMenuHeight: MainWindowStyle.searchBox.maxHeight //: 'Add Participants' : Placeholder in a search bar for adding participant to the chat room