fix changing video layout conference #LINQT-1896

This commit is contained in:
Gaelle Braud 2025-09-11 16:50:35 +02:00
parent 2a57289e18
commit cdb23ce0a4
3 changed files with 8 additions and 13 deletions

View file

@ -287,7 +287,7 @@ void CallModel::updateConferenceVideoLayout() {
auto callParams = mMonitor->getParams();
// auto settings = CoreManager::getInstance()->getSettingsModel();
auto newLayout = LinphoneEnums::fromLinphone(callParams->getConferenceVideoLayout());
if (!SettingsModel::getInstance()->getVideoEnabled()) newLayout = LinphoneEnums::ConferenceLayout::AudioOnly;
if (!callParams->videoEnabled()) newLayout = LinphoneEnums::ConferenceLayout::AudioOnly;
if (!mConference) newLayout = LinphoneEnums::ConferenceLayout::ActiveSpeaker;
if (mConferenceVideoLayout != newLayout) { // && !getPausedByUser()) { // Only update if not in pause.
// if (mMonitor->getConference()) {
@ -297,7 +297,7 @@ void CallModel::updateConferenceVideoLayout() {
// } else settings->setCameraMode(settings->getCallCameraMode());
// TODO : change layout for grid/active speaker in settings
lDebug() << "Changing layout from " << mConferenceVideoLayout << " into " << newLayout;
lDebug() << "Updating layout from " << mConferenceVideoLayout << " into " << newLayout;
mConferenceVideoLayout = newLayout;
emit conferenceVideoLayoutChanged(mConferenceVideoLayout);
}

View file

@ -1574,7 +1574,6 @@ VariantObject *Utils::getCurrentCallChat(CallGui *call) {
if (linphoneChatRoom != nullptr) {
qDebug() << "Chatroom created with" << callModel->getRemoteAddress()->asStringUriOnly();
auto id = linphoneChatRoom->getIdentifier();
auto params = linphoneChatRoom->getParams();
auto chatCore = ChatCore::create(linphoneChatRoom);
return QVariant::fromValue(new ChatGui(chatCore));
} else {
@ -1611,7 +1610,6 @@ VariantObject *Utils::getChatForAddress(QString address) {
linphoneChatRoom = ToolModel::createChatForAddress(linAddr);
if (linphoneChatRoom != nullptr) {
qDebug() << "Chatroom created with" << linAddr->asStringUriOnly();
auto params = linphoneChatRoom->getParams();
auto chatCore = ChatCore::create(linphoneChatRoom);
return QVariant::fromValue(new ChatGui(chatCore));
} else {

View file

@ -87,16 +87,13 @@ AbstractWindow {
function changeLayout(layoutIndex) {
if (layoutIndex == 0) {
console.log("Set Grid layout")
call.core.lSetConferenceVideoLayout(
LinphoneEnums.ConferenceLayout.Grid)
call.core.lSetConferenceVideoLayout(LinphoneEnums.ConferenceLayout.Grid)
} else if (layoutIndex == 1) {
console.log("Set AS layout")
call.core.lSetConferenceVideoLayout(
LinphoneEnums.ConferenceLayout.ActiveSpeaker)
call.core.lSetConferenceVideoLayout(LinphoneEnums.ConferenceLayout.ActiveSpeaker)
} else {
console.log("Set audio-only layout")
call.core.lSetConferenceVideoLayout(
LinphoneEnums.ConferenceLayout.AudioOnly)
console.log("Set audio-only layout", layoutIndex)
call.core.lSetConferenceVideoLayout(LinphoneEnums.ConferenceLayout.AudioOnly)
}
}
@ -869,8 +866,8 @@ AbstractWindow {
}
call: mainWindow.call
onChangeLayoutRequested: index => {
mainWindow.changeLayout(index)
}
mainWindow.changeLayout(index)
}
}
}
Component {