fix #LINQT-1836 microphone muted in conference

This commit is contained in:
Gaelle Braud 2025-07-28 17:18:08 +02:00
parent 2e0d963bd2
commit aae8e7b63e
2 changed files with 30 additions and 27 deletions

View file

@ -107,8 +107,6 @@ CallCore::CallCore(const std::shared_ptr<linphone::Call> &call) : QObject(nullpt
mCallModel->setSelf(mCallModel); mCallModel->setSelf(mCallModel);
mDuration = call->getDuration(); mDuration = call->getDuration();
mIsStarted = mDuration > 0; mIsStarted = mDuration > 0;
mMicrophoneMuted = call->getMicrophoneMuted();
mSpeakerMuted = call->getSpeakerMuted();
auto videoDirection = call->getParams()->getVideoDirection(); auto videoDirection = call->getParams()->getVideoDirection();
mLocalVideoEnabled = mLocalVideoEnabled =
videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv; videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv;
@ -158,6 +156,8 @@ CallCore::CallCore(const std::shared_ptr<linphone::Call> &call) : QObject(nullpt
if (mIsConference) { if (mIsConference) {
mConference = ConferenceCore::create(conference); mConference = ConferenceCore::create(conference);
} }
mMicrophoneMuted = conference ? conference->getMicrophoneMuted() : call->getMicrophoneMuted();
mSpeakerMuted = call->getSpeakerMuted();
mPaused = mState == LinphoneEnums::CallState::Pausing || mState == LinphoneEnums::CallState::Paused || mPaused = mState == LinphoneEnums::CallState::Pausing || mState == LinphoneEnums::CallState::Paused ||
mState == LinphoneEnums::CallState::PausedByRemote; mState == LinphoneEnums::CallState::PausedByRemote;
@ -211,7 +211,8 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
//: "Enregistrement terminé" //: "Enregistrement terminé"
Utils::showInformationPopup(tr("call_record_end_message"), Utils::showInformationPopup(tr("call_record_end_message"),
//: "L'appel a été enregistré dans le fichier : %1" //: "L'appel a été enregistré dans le fichier : %1"
tr("call_record_saved_in_file_message").arg(QString::fromStdString(mCallModel->getRecordFile())), tr("call_record_saved_in_file_message")
.arg(QString::fromStdString(mCallModel->getRecordFile())),
true, App::getInstance()->getCallsWindow()); true, App::getInstance()->getCallsWindow());
} }
}); });

View file

@ -116,8 +116,10 @@ void CallModel::terminateAllCalls() {
void CallModel::setMicrophoneMuted(bool isMuted) { void CallModel::setMicrophoneMuted(bool isMuted) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
mMonitor->setMicrophoneMuted(isMuted); if (mMonitor->getConference()) mMonitor->getConference()->setMicrophoneMuted(isMuted);
emit microphoneMutedChanged(isMuted); else mMonitor->setMicrophoneMuted(isMuted);
emit microphoneMutedChanged(mMonitor->getConference() ? mMonitor->getConference()->getMicrophoneMuted()
: mMonitor->getMicrophoneMuted());
} }
void CallModel::setSpeakerMuted(bool isMuted) { void CallModel::setSpeakerMuted(bool isMuted) {