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 callParams = mMonitor->getParams();
// auto settings = CoreManager::getInstance()->getSettingsModel(); // auto settings = CoreManager::getInstance()->getSettingsModel();
auto newLayout = LinphoneEnums::fromLinphone(callParams->getConferenceVideoLayout()); 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 (!mConference) newLayout = LinphoneEnums::ConferenceLayout::ActiveSpeaker;
if (mConferenceVideoLayout != newLayout) { // && !getPausedByUser()) { // Only update if not in pause. if (mConferenceVideoLayout != newLayout) { // && !getPausedByUser()) { // Only update if not in pause.
// if (mMonitor->getConference()) { // if (mMonitor->getConference()) {
@ -297,7 +297,7 @@ void CallModel::updateConferenceVideoLayout() {
// } else settings->setCameraMode(settings->getCallCameraMode()); // } else settings->setCameraMode(settings->getCallCameraMode());
// TODO : change layout for grid/active speaker in settings // 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; mConferenceVideoLayout = newLayout;
emit conferenceVideoLayoutChanged(mConferenceVideoLayout); emit conferenceVideoLayoutChanged(mConferenceVideoLayout);
} }

View file

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

View file

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