From d8b33de489a2ace417181f20f853b51e934da106 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 4 May 2022 09:12:46 +0200 Subject: [PATCH] - Audio only mode - Fix camera/video enabling behaviour - Fix calendar design --- .../images/conference_audio_only_custom.svg | 60 +++++++++++++++++++ linphone-app/resources.qrc | 1 + .../src/components/call/CallModel.cpp | 35 ++++++++++- .../src/components/call/CallModel.hpp | 5 ++ .../src/components/calls/CallsListModel.cpp | 13 ++-- .../ui/modules/Linphone/Camera/CameraItem.qml | 22 ++++++- .../ui/modules/Linphone/Camera/CameraView.qml | 22 ++++++- .../Linphone/Chat/ChatCalendarMessage.qml | 7 ++- .../Styles/Camera/CameraViewStyle.qml | 10 ++++ .../ui/views/App/Calls/VideoConference.qml | 7 ++- .../Calls/VideoConferenceActiveSpeaker.qml | 5 ++ .../views/App/Calls/VideoConferenceGrid.qml | 9 ++- .../views/App/Calls/VideoConferenceMenu.qml | 13 +++- .../ui/views/App/Calls/WaitingRoom.qml | 22 ++++--- .../Styles/Calls/VideoConferenceMenuStyle.qml | 2 + .../App/Styles/Calls/WaitingRoomStyle.qml | 13 ++++ linphone-sdk | 2 +- 17 files changed, 216 insertions(+), 32 deletions(-) create mode 100644 linphone-app/assets/images/conference_audio_only_custom.svg diff --git a/linphone-app/assets/images/conference_audio_only_custom.svg b/linphone-app/assets/images/conference_audio_only_custom.svg new file mode 100644 index 000000000..6eeb101b4 --- /dev/null +++ b/linphone-app/assets/images/conference_audio_only_custom.svg @@ -0,0 +1,60 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/linphone-app/resources.qrc b/linphone-app/resources.qrc index 30fe01447..cb6a18777 100644 --- a/linphone-app/resources.qrc +++ b/linphone-app/resources.qrc @@ -54,6 +54,7 @@ assets/images/close_custom.svg assets/images/collapsed_custom.svg assets/images/conference_custom.svg + assets/images/conference_audio_only_custom.svg assets/images/conference_layout_grid_custom.svg assets/images/conference_layout_grid.svg assets/images/conference_layout_active_speaker_custom.svg diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index d02b30ef2..4a1fc68ce 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -643,6 +643,36 @@ void CallModel::setMicroMuted (bool status) { // ----------------------------------------------------------------------------- +bool CallModel::getCameraEnabled () const{ + return mCall && (((int)mCall->getCurrentParams()->getVideoDirection() & (int)linphone::MediaDirection::SendOnly) == (int)linphone::MediaDirection::SendOnly); +} + +void CallModel::setCameraEnabled (bool status){ + shared_ptr core = CoreManager::getInstance()->getCore(); + if (!core->videoSupported()) { + qWarning() << QStringLiteral("Unable to update video call property. (Video not supported.)"); + return; + } + if(mCall) { + switch (mCall->getState()) { + case linphone::Call::State::Connected: + case linphone::Call::State::StreamsRunning: + break; + default: { + qWarning() << "Cannot set Camera mode because of call status : " << (int)mCall->getState() << " is not in {" <<(int)linphone::Call::State::Connected << ", " <<(int)linphone::Call::State::StreamsRunning << "}"; + return; + } + } + if (status == getCameraEnabled()) + return; + + shared_ptr params = core->createCallParams(mCall); + params->setVideoDirection(status ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly); + mCall->update(params); + } +} +// ----------------------------------------------------------------------------- + bool CallModel::getPausedByUser () const { return mPausedByUser; } @@ -678,7 +708,9 @@ bool CallModel::getRemoteVideoEnabled () const { bool CallModel::getVideoEnabled () const { if(mCall){ shared_ptr params = mCall->getCurrentParams(); - return params && params->videoEnabled() && getStatus() == CallStatusConnected && mCall->getState() == linphone::Call::State::StreamsRunning; + bool t = params && params->videoEnabled();// && getStatus() == CallStatusConnected && mCall->getState() == linphone::Call::State::StreamsRunning; + qWarning() << t << " => " << (params && params->videoEnabled()) << ", " << (int)getStatus() << ", " << (int)mCall->getState(); + return t; }else return true; } @@ -847,6 +879,7 @@ LinphoneEnums::ConferenceLayout CallModel::getConferenceVideoLayout() const{ void CallModel::changeConferenceVideoLayout(LinphoneEnums::ConferenceLayout layout){ shared_ptr params = CoreManager::getInstance()->getCore()->createCallParams(mCall); params->setConferenceVideoLayout(LinphoneEnums::toLinphone(layout)); + params->enableVideo(true); mCall->update(params); } diff --git a/linphone-app/src/components/call/CallModel.hpp b/linphone-app/src/components/call/CallModel.hpp index ddfb7432f..1b721d500 100644 --- a/linphone-app/src/components/call/CallModel.hpp +++ b/linphone-app/src/components/call/CallModel.hpp @@ -66,6 +66,7 @@ class CallModel : public QObject { Q_PROPERTY(bool pausedByUser READ getPausedByUser WRITE setPausedByUser NOTIFY statusChanged) Q_PROPERTY(bool videoEnabled READ getVideoEnabled WRITE setVideoEnabled NOTIFY statusChanged) + Q_PROPERTY(bool cameraEnabled READ getCameraEnabled WRITE setCameraEnabled NOTIFY statusChanged) Q_PROPERTY(bool updating READ getUpdating NOTIFY statusChanged) Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged) @@ -188,6 +189,7 @@ signals: void conferenceModelChanged(); void speakerMutedChanged (bool status); void microMutedChanged (bool status); + void cameraEnabledChanged(); void recordingChanged (bool status); void statsUpdated (); void statusChanged (CallStatus status); @@ -234,6 +236,9 @@ public: bool getMicroMuted () const; void setMicroMuted (bool status); + + bool getCameraEnabled () const; + void setCameraEnabled (bool status); bool getPausedByUser () const; void setPausedByUser (bool status); diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp index 593010ab7..6b634708d 100644 --- a/linphone-app/src/components/calls/CallsListModel.cpp +++ b/linphone-app/src/components/calls/CallsListModel.cpp @@ -183,19 +183,22 @@ void CallsListModel::launchVideoCall (const QString &sipAddress, const QString& shared_ptr params = core->createCallParams(nullptr); - - params->setConferenceVideoLayout(options.contains("layout") ? LinphoneEnums::toLinphone((LinphoneEnums::ConferenceLayout)options["layout"].toInt()) : linphone::ConferenceLayout::Grid); - params->enableMic(options.contains("micro") ? options["micro"].toBool() : true); - + auto layout = options.contains("layout") ? LinphoneEnums::toLinphone((LinphoneEnums::ConferenceLayout)options["layout"].toInt()) : linphone::ConferenceLayout::Grid; + bool enableMicro =options.contains("micro") ? options["micro"].toBool() : true; bool enableVideo = options.contains("video") ? options["video"].toBool() : true; + bool enableCamera = options.contains("camera") ? options["camera"].toBool() : true; bool enableSpeaker = options.contains("audio") ? options["audio"].toBool() : true; + + params->setConferenceVideoLayout(layout); + params->enableMic(enableMicro); params->enableVideo(enableVideo); + params->setVideoDirection(enableCamera ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly); params->setAccount(core->getDefaultAccount()); CallModel::setRecordFile(params, Utils::coreStringToAppString(address->getUsername())); auto call = core->inviteAddressWithParams(address, params); call->setSpeakerMuted(!enableSpeaker); - qWarning() << "Launch Video call camera: " << enableVideo << " speaker:" << enableSpeaker << ", micro:" << params->micEnabled(); + qWarning() << "Launch " << (enableVideo ? "video" : "audio") << " call; camera: " << enableCamera<< " speaker:" << enableSpeaker << ", micro:" << params->micEnabled() << ", layout:" << (int)layout; CallModel::prepareTransfert(call, prepareTransfertAddress); } diff --git a/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml b/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml index 68a390613..eaecc263c 100644 --- a/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml +++ b/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml @@ -16,13 +16,29 @@ import 'qrc:/ui/scripts/Utils/utils.js' as Utils // ============================================================================= Item { id: container + property bool isCameraFromDevice: true property ParticipantDeviceModel currentDevice property CallModel callModel - property bool isPreview: !callModel && ( !container.currentDevice || container.currentDevice.isMe) + property bool isPreview: !callModel || !container.currentDevice || container.currentDevice.isMe property bool isFullscreen: false property bool hideCamera: false //callModel.pausedByUser property bool isPaused: false - property bool isVideoEnabled: enabled && (!container.currentDevice || (container.currentDevice && container.currentDevice.videoEnabled)) + property bool isVideoEnabled: enabled + && (!callModel || callModel.videoEnabled) + && (!container.currentDevice || callModel && (container.currentDevice + && (container.currentDevice.videoEnabled || (container.currentDevice.isMe && callModel.cameraEnabled)))) + + property bool a : callModel && callModel.videoEnabled + property bool b: container.currentDevice && container.currentDevice.videoEnabled + property bool c: container.currentDevice && container.currentDevice.isMe + property bool d : callModel && callModel.cameraEnabled + onAChanged: console.log("A: " + a + ", " +callModel) + onBChanged: console.log("B: " + b + ", " +container.currentDevice) + onCChanged: console.log("C: " + c + ", " +container.currentDevice) + onDChanged: console.log("D: " + d + ", " +callModel) + onIsVideoEnabledChanged: console.log('VideoIsEnabled: '+isVideoEnabled) + + //onIsVideoEnabledChanged: console.log(callModel.videoEnabled + ","+container.currentDevice.videoEnabled+','+container.currentDevice.isMe+','+callModel.cameraEnabled) property bool isReady: cameraLoader.item && cameraLoader.item.isReady onCurrentDeviceChanged: resetActive() function resetActive(){ @@ -57,7 +73,7 @@ Item { id: camera Camera { participantDeviceModel: container.currentDevice - call: container.callModel + call: container.isCameraFromDevice ? null : container.callModel anchors.fill: parent isPreview: container.isPreview diff --git a/linphone-app/ui/modules/Linphone/Camera/CameraView.qml b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml index 16022f663..d7f1e5788 100644 --- a/linphone-app/ui/modules/Linphone/Camera/CameraView.qml +++ b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml @@ -19,6 +19,7 @@ Item{ property alias isPaused: camera.isPaused property alias isPreview: camera.isPreview property alias isFullscreen: camera.isFullscreen + property alias isCameraFromDevice: camera.isCameraFromDevice property bool showCloseButton: true property color color : CameraViewStyle.outBackgroundColor signal closeRequested() @@ -152,7 +153,7 @@ Item{ source: username } ActionButton{ - visible: mainItem.showCloseButton && camera.isPreview + visible: mainItem.showCloseButton && camera.isPreview && mainItem.callModel && mainItem.callModel.videoEnabled anchors.right: parent.right anchors.top: parent.top anchors.rightMargin: 5 @@ -179,6 +180,25 @@ Item{ iconSize: CameraViewStyle.isMuted.button.iconSize } } + + Rectangle{ + visible: (mainItem.callModel && !mainItem.callModel.videoEnabled) || + (mainItem.currentDevice && !mainItem.currentDevice.videoEnabled) + anchors.right: parent.right + anchors.top: parent.top + anchors.rightMargin: 15 + anchors.topMargin: 15 + height: CameraViewStyle.isAudioOnly.button.iconSize + width: height + radius: width/2 + color: CameraViewStyle.isAudioOnly.button.backgroundNormalColor + Icon{ + anchors.centerIn: parent + icon: CameraViewStyle.isAudioOnly.button.icon + overwriteColor: CameraViewStyle.isAudioOnly.button.foregroundNormalColor + iconSize: CameraViewStyle.isAudioOnly.button.iconSize + } + } } diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml index 6a2aab7a5..890ae25ac 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml @@ -25,7 +25,8 @@ Loader{ property ConferenceInfoModel conferenceInfoModel: contentModel ? contentModel.conferenceInfoModel : null property int maxWidth : parent.width property int fitHeight: active && item ? item.fitHeight + ChatCalendarMessageStyle.topMargin+ChatCalendarMessageStyle.bottomMargin + (isExpanded? 200 : 0): 0 - property int fitWidth: active && item ? Math.max(item.fitWidth, maxWidth/2) + ChatCalendarMessageStyle.widthMargin*2 : 0 + //property int fitWidth: active && item ? Math.max(item.fitWidth, maxWidth/2) + ChatCalendarMessageStyle.widthMargin*2 : 0 + property int fitWidth: active && item ? maxWidth/2 + ChatCalendarMessageStyle.widthMargin*2 : 0 property bool containsMouse: false property int gotoButtonMode: -1 //-1: hide, 0:goto, 1:MoreInfo property bool isExpanded : false @@ -54,7 +55,7 @@ Loader{ hoverEnabled: true onClicked: CallsListModel.prepareConferenceCall(mainItem.conferenceInfoModel) - onHoveredChanged: mainItem.containsMouse = loadedItem.containsMouse + onHoveredChanged: mainItem.containsMouse = loadedItem.containsMouse ColumnLayout{ id: layout @@ -112,6 +113,7 @@ Loader{ //Layout.preferredHeight: Layout.leftMargin: 10 Layout.alignment: Qt.AlignRight + elide: Text.ElideRight color: ChatCalendarMessageStyle.subject.color font.pointSize: ChatCalendarMessageStyle.subject.pointSize font.weight: Font.Bold @@ -135,7 +137,6 @@ Loader{ Text { id: participantsList Layout.fillWidth: true - Layout.minimumWidth: implicitWidth color: ChatCalendarMessageStyle.participants.color elide: Text.ElideRight font.pointSize: ChatCalendarMessageStyle.participants.pointSize diff --git a/linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml b/linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml index b15df4263..0da8caf62 100644 --- a/linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml +++ b/linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml @@ -60,4 +60,14 @@ QtObject { property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg', icon, 's_d_b_fg').color } } + property QtObject isAudioOnly: QtObject{ + property color backgroundColor : ColorsList.add(sectionName+'_isAudioOnly_bg', 'l').color + property QtObject button: QtObject { + property int iconSize: 40 + property string icon : 'conference_audio_only_custom' + property string name : 'isAudioOnly' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg', icon, 's_d_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg', icon, 's_d_b_fg').color + } + } } diff --git a/linphone-app/ui/views/App/Calls/VideoConference.qml b/linphone-app/ui/views/App/Calls/VideoConference.qml index 161d4f6e4..a7cce487e 100644 --- a/linphone-app/ui/views/App/Calls/VideoConference.qml +++ b/linphone-app/ui/views/App/Calls/VideoConference.qml @@ -201,7 +201,7 @@ Rectangle { id: conferenceLayout Layout.fillHeight: true Layout.fillWidth: true - sourceComponent: conference.callModel.conferenceVideoLayout == LinphoneEnums.ConferenceLayoutGrid ? gridComponent : activeSpeakerComponent + sourceComponent: conference.callModel.conferenceVideoLayout == LinphoneEnums.ConferenceLayoutGrid || !conference.callModel.videoEnabled? gridComponent : activeSpeakerComponent onSourceComponentChanged: console.log(conference.callModel.conferenceVideoLayout) active: conference.callModel ColumnLayout { @@ -310,9 +310,10 @@ Rectangle { id: camera isCustom: true backgroundRadius: 90 - colorSet: callModel && callModel.videoEnabled ? VideoConferenceStyle.buttons.cameraOn : VideoConferenceStyle.buttons.cameraOff + colorSet: callModel && callModel.cameraEnabled ? VideoConferenceStyle.buttons.cameraOn : VideoConferenceStyle.buttons.cameraOff updating: callModel.videoEnabled && callModel.updating - onClicked: if(callModel) callModel.videoEnabled = !callModel.videoEnabled + enabled: callModel.videoEnabled + onClicked: if(callModel) callModel.cameraEnabled = !callModel.cameraEnabled } } RowLayout{ diff --git a/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml index 45095294d..13d66c64a 100644 --- a/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml @@ -32,11 +32,14 @@ Item { id: allDevices showMe: true onParticipantSpeaking: cameraView.currentDevice = speakingDevice + property bool cameraEnabled: callModel && callModel.cameraEnabled + onCameraEnabledChanged: showMe = cameraEnabled // Do it on changed to ignore hard bindings (that can be override) } CameraView{ id: cameraView callModel: mainItem.callModel + isCameraFromDevice: false anchors.fill: parent anchors.leftMargin: isRightReducedLayout || isLeftReducedLayout? 30 : 140 anchors.rightMargin: isRightReducedLayout ? 10 : 140 @@ -70,6 +73,8 @@ Item { width: miniViews.width - 6 enabled: index >=0 currentDevice: modelData + callModel: mainItem.callModel + isCameraFromDevice: true isPaused: mainItem.callModel.pausedByUser || currentDevice && currentDevice.isPaused //callModel.pausedByUser onCloseRequested: mainItem.showMe = false //color: 'black' diff --git a/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml b/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml index ced3ab20e..88e52ee42 100644 --- a/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml +++ b/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml @@ -45,7 +45,8 @@ Mosaic { id: gridModel property ParticipantDeviceProxyModel participantDevices : ParticipantDeviceProxyModel { id: participantDevices - //callModel: conference.callModel + property bool cameraEnabled: callModel && callModel.cameraEnabled + onCameraEnabledChanged: showMe = cameraEnabled // Do it on changed to ignore hard bindings (that can be override) showMe: true } model: participantDevices @@ -72,10 +73,12 @@ Mosaic { enabled: index >=0 anchors.fill: parent currentDevice: avatarCell.currentDevice + callModel: participantDevices.callModel + isCameraFromDevice: true isPaused: grid.callModel.pausedByUser || avatarCell.currentDevice && avatarCell.currentDevice.isPaused //callModel.pausedByUser - onCloseRequested: grid.remove( index) + onCloseRequested: participantDevices.showMe = false //grid.remove( index) //color: 'black' } } } -} \ No newline at end of file +} diff --git a/linphone-app/ui/views/App/Calls/VideoConferenceMenu.qml b/linphone-app/ui/views/App/Calls/VideoConferenceMenu.qml index 9bbb2ce7b..20548f72b 100644 --- a/linphone-app/ui/views/App/Calls/VideoConferenceMenu.qml +++ b/linphone-app/ui/views/App/Calls/VideoConferenceMenu.qml @@ -86,7 +86,9 @@ Rectangle{ Layout.fillWidth: true Repeater{ model: [{text: 'Modifier la mise en page' - , icon: (mainItem.callModel.conferenceVideoLayout == LinphoneEnums.ConferenceLayoutGrid ? VideoConferenceMenuStyle.settingsIcons.gridIcon : VideoConferenceMenuStyle.settingsIcons.activeSpeakerIcon) + , icon: (mainItem.callModel.videoEnabled ? + (mainItem.callModel.conferenceVideoLayout == LinphoneEnums.ConferenceLayoutGrid ? VideoConferenceMenuStyle.settingsIcons.gridIcon : VideoConferenceMenuStyle.settingsIcons.activeSpeakerIcon) + : VideoConferenceMenuStyle.settingsIcons.audioOnlyIcon) , nextPage:layoutMenu} ] delegate: @@ -147,6 +149,7 @@ Rectangle{ Repeater{ model: [{text: 'Mode mosaïque', icon: VideoConferenceMenuStyle.modeIcons.gridIcon, value:LinphoneEnums.ConferenceLayoutGrid} , {text: 'Mode présentateur', icon: VideoConferenceMenuStyle.modeIcons.activeSpeakerIcon, value:LinphoneEnums.ConferenceLayoutActiveSpeaker} + , {text: 'Mode audio', icon: VideoConferenceMenuStyle.modeIcons.audioOnlyIcon, value:2} ] delegate: Borders{ @@ -164,9 +167,13 @@ Rectangle{ Layout.preferredHeight: contentItem.implicitHeight Layout.alignment: Qt.AlignVCenter ButtonGroup.group: modeGroup - checked: mainItem.callModel ? modelData.value == mainItem.callModel.conferenceVideoLayout : false + checked: mainItem.callModel ? (mainItem.callModel.videoEnabled && modelData.value == mainItem.callModel.conferenceVideoLayout) + || (!mainItem.callModel.videoEnabled && modelData.value == 2) + : false + onCheckedChanged: console.log(mainItem.callModel ? mainItem.callModel.videoEnabled +","+mainItem.callModel.conferenceVideoLayout : '') text: modelData.text - onClicked: mainItem.callModel.conferenceVideoLayout = modelData.value + onClicked: if(modelData.value == 2) mainItem.callModel.videoEnabled = false + else mainItem.callModel.conferenceVideoLayout = modelData.value } Icon{ id: layoutIcon diff --git a/linphone-app/ui/views/App/Calls/WaitingRoom.qml b/linphone-app/ui/views/App/Calls/WaitingRoom.qml index 9cda8dacd..e27e63040 100644 --- a/linphone-app/ui/views/App/Calls/WaitingRoom.qml +++ b/linphone-app/ui/views/App/Calls/WaitingRoom.qml @@ -15,7 +15,7 @@ Rectangle { id: mainItem color: WaitingRoomStyle.backgroundColor property ConferenceInfoModel conferenceInfoModel - + signal cancel() function close(){ @@ -88,21 +88,20 @@ Rectangle { isCustom: true backgroundRadius: 90 colorSet: cameraEnabled ? WaitingRoomStyle.buttons.cameraOn : WaitingRoomStyle.buttons.cameraOff + enabled: modeChoice.selectedMode != 2 //updating: cameraEnabled && callModel.updating onClicked: cameraEnabled = !cameraEnabled } } RowLayout{ ActionButton{ - id: layoutChoice - property int selectedLayout: LinphoneEnums.ConferenceLayoutGrid + id: modeChoice + property int selectedMode: 0 isCustom: true backgroundRadius: width/2 - colorSet: selectedLayout == LinphoneEnums.ConferenceLayoutGrid ? WaitingRoomStyle.buttons.gridLayout : WaitingRoomStyle.buttons.activeSpeakerLayout - onClicked: if( selectedLayout == LinphoneEnums.ConferenceLayoutGrid ) - selectedLayout = LinphoneEnums.ConferenceLayoutActiveSpeaker - else - selectedLayout = LinphoneEnums.ConferenceLayoutGrid + colorSet: selectedMode == 0 ? WaitingRoomStyle.buttons.gridLayout : + selectedMode == 1 ? WaitingRoomStyle.buttons.activeSpeakerLayout : WaitingRoomStyle.buttons.audioOnly + onClicked: selectedMode = (selectedMode + 1) % 3 /* colorSet: callModel.pausedByUser ? WaitingRoomStyle.buttons.play : WaitingRoomStyle.buttons.pause onClicked: callModel.pausedByUser = !callModel.pausedByUser @@ -128,7 +127,12 @@ Rectangle { TextButtonB { text: 'DEMARRER' - onClicked: {mainItem.close(); CallsListModel.launchVideoCall(conferenceInfoModel.uri, '', 0, {video: camera.cameraEnabled, micro:!micro.microMuted, audio:!speaker.speakerMuted, layout: layoutChoice.selectedLayout}) } + onClicked: {mainItem.close(); CallsListModel.launchVideoCall(conferenceInfoModel.uri, '', 0, + { video: modeChoice.selectedMode != 2 + , camera: camera.cameraEnabled + , micro: !micro.microMuted + , audio: !speaker.speakerMuted + , layout: (modeChoice.selectedMode % 2)}) } } } diff --git a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceMenuStyle.qml b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceMenuStyle.qml index fc3be9b0d..8c659da52 100644 --- a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceMenuStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceMenuStyle.qml @@ -35,12 +35,14 @@ QtObject { property QtObject modeIcons: QtObject{ property string gridIcon: 'conference_layout_grid_custom' property string activeSpeakerIcon: 'conference_layout_active_speaker_custom' + property string audioOnlyIcon: 'conference_audio_only_custom' property int width: 40 property int height: 40 } property QtObject settingsIcons: QtObject{ property string gridIcon: 'conference_layout_grid_custom' property string activeSpeakerIcon: 'conference_layout_active_speaker_custom' + property string audioOnlyIcon: 'conference_audio_only_custom' property int width: 40 property int height: 40 } diff --git a/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml index cec186141..77c40dc6c 100644 --- a/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml @@ -223,6 +223,19 @@ QtObject { property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color } + property QtObject audioOnly: QtObject { + property int iconSize: 40 + property string icon : 'conference_audio_only_custom' + property string name : 'audioOnly' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_u', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color + } /* property QtObject callsList: QtObject { property int iconSize: 40 diff --git a/linphone-sdk b/linphone-sdk index 01e12c490..dbc795c83 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit 01e12c490219965084a16b6dccda107c45d80bc2 +Subproject commit dbc795c83ef288e5fd27eb4a2a8a1c9da127eb95