mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
- Audio only mode
- Fix camera/video enabling behaviour - Fix calendar design
This commit is contained in:
parent
24e2f9f906
commit
d8b33de489
17 changed files with 216 additions and 32 deletions
60
linphone-app/assets/images/conference_audio_only_custom.svg
Normal file
60
linphone-app/assets/images/conference_audio_only_custom.svg
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="80"
|
||||
height="80"
|
||||
viewBox="0 0 80 80"
|
||||
version="1.1"
|
||||
id="svg6"
|
||||
sodipodi:docname="conference_layout_audio_custom.svg"
|
||||
inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
|
||||
<metadata
|
||||
id="metadata12">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs10" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1670"
|
||||
inkscape:window-height="871"
|
||||
id="namedview8"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.7837838"
|
||||
inkscape:cx="74"
|
||||
inkscape:cy="46.336449"
|
||||
inkscape:window-x="26"
|
||||
inkscape:window-y="78"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg6" />
|
||||
<g
|
||||
fill="#000000"
|
||||
fill-rule="nonzero"
|
||||
id="g4"
|
||||
transform="matrix(0.68965517,0,0,0.69444444,-11.206896,-11.388889)">
|
||||
<path
|
||||
d="m 41,60 a 3,3 0 0 0 -3,3 v 22 a 3,3 0 0 0 6,0 V 63 a 3,3 0 0 0 -3,-3 z m 16.5,-6 a 3,3 0 0 0 -3,3 v 35 a 3,3 0 0 0 6,0 V 57 a 3,3 0 0 0 -3,-3 z m 17,-16 a 3,3 0 0 0 -3,3 v 66 a 3,3 0 0 0 6,0 V 41 a 3,3 0 0 0 -3,-3 z m 16,7 a 3,3 0 0 0 -3,3 v 52 a 3,3 0 0 0 6,0 V 48 a 3,3 0 0 0 -3,-3 z m 17,15 a 3,3 0 0 0 -3,3 v 22 a 3,3 0 0 0 6,0 V 63 a 3,3 0 0 0 -3,-3 z"
|
||||
id="path2" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2 KiB |
|
|
@ -54,6 +54,7 @@
|
|||
<file>assets/images/close_custom.svg</file>
|
||||
<file>assets/images/collapsed_custom.svg</file>
|
||||
<file>assets/images/conference_custom.svg</file>
|
||||
<file>assets/images/conference_audio_only_custom.svg</file>
|
||||
<file>assets/images/conference_layout_grid_custom.svg</file>
|
||||
<file>assets/images/conference_layout_grid.svg</file>
|
||||
<file>assets/images/conference_layout_active_speaker_custom.svg</file>
|
||||
|
|
|
|||
|
|
@ -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<linphone::Core> 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<linphone::CallParams> 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<const linphone::CallParams> 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<linphone::CallParams> params = CoreManager::getInstance()->getCore()->createCallParams(mCall);
|
||||
params->setConferenceVideoLayout(LinphoneEnums::toLinphone(layout));
|
||||
params->enableVideo(true);
|
||||
mCall->update(params);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -183,19 +183,22 @@ void CallsListModel::launchVideoCall (const QString &sipAddress, const QString&
|
|||
|
||||
shared_ptr<linphone::CallParams> 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)}) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 01e12c490219965084a16b6dccda107c45d80bc2
|
||||
Subproject commit dbc795c83ef288e5fd27eb4a2a8a1c9da127eb95
|
||||
Loading…
Add table
Reference in a new issue