mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
fix changing video layout conference #LINQT-1896
This commit is contained in:
parent
2a57289e18
commit
cdb23ce0a4
3 changed files with 8 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue