fix record ui + pause
This commit is contained in:
parent
fa259d2a31
commit
e3b587bdbd
4 changed files with 31 additions and 31 deletions
|
|
@ -268,6 +268,7 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
||||||
setSpeakerVolumeGain(speakerVolume);
|
setSpeakerVolumeGain(speakerVolume);
|
||||||
setMicrophoneVolumeGain(micVolume);
|
setMicrophoneVolumeGain(micVolume);
|
||||||
setRecordable(state == linphone::Call::State::StreamsRunning);
|
setRecordable(state == linphone::Call::State::StreamsRunning);
|
||||||
|
setPaused(state == linphone::Call::State::Paused || state == linphone::Call::State::PausedByRemote);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
mCallModelConnection->makeConnectToModel(&CallModel::statusChanged, [this](linphone::Call::Status status) {
|
mCallModelConnection->makeConnectToModel(&CallModel::statusChanged, [this](linphone::Call::Status status) {
|
||||||
|
|
@ -276,9 +277,6 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
||||||
mCallModelConnection->makeConnectToCore(&CallCore::lSetPaused, [this](bool paused) {
|
mCallModelConnection->makeConnectToCore(&CallCore::lSetPaused, [this](bool paused) {
|
||||||
mCallModelConnection->invokeToModel([this, paused]() { mCallModel->setPaused(paused); });
|
mCallModelConnection->invokeToModel([this, paused]() { mCallModel->setPaused(paused); });
|
||||||
});
|
});
|
||||||
mCallModelConnection->makeConnectToModel(&CallModel::pausedChanged, [this](bool paused) {
|
|
||||||
mCallModelConnection->invokeToCore([this, paused]() { setPaused(paused); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mCallModelConnection->makeConnectToCore(&CallCore::lTransferCall, [this](QString address) {
|
mCallModelConnection->makeConnectToCore(&CallCore::lTransferCall, [this](QString address) {
|
||||||
mCallModelConnection->invokeToModel([this, address]() {
|
mCallModelConnection->invokeToModel([this, address]() {
|
||||||
|
|
|
||||||
|
|
@ -90,15 +90,12 @@ void CallModel::terminate() {
|
||||||
|
|
||||||
void CallModel::setPaused(bool paused) {
|
void CallModel::setPaused(bool paused) {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
linphone::Status status = -1;
|
|
||||||
if (paused) {
|
if (paused) {
|
||||||
if (mMonitor->getConference()) status = mMonitor->getConference()->leave();
|
if (mMonitor->getConference()) mMonitor->getConference()->leave();
|
||||||
else status = mMonitor->pause();
|
mMonitor->pause();
|
||||||
if (status == 0) emit pausedChanged(paused);
|
|
||||||
} else {
|
} else {
|
||||||
if (mMonitor->getConference()) status = mMonitor->getConference()->enter();
|
if (mMonitor->getConference()) mMonitor->getConference()->enter();
|
||||||
else status = mMonitor->resume();
|
mMonitor->resume();
|
||||||
if (status == 0) emit pausedChanged(paused);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -421,17 +421,20 @@ AppWindow {
|
||||||
|
|
||||||
Control.Control {
|
Control.Control {
|
||||||
visible: mainWindow.call && (mainWindow.call.core.recording || mainWindow.call.core.remoteRecording)
|
visible: mainWindow.call && (mainWindow.call.core.recording || mainWindow.call.core.remoteRecording)
|
||||||
width: 563 * DefaultStyle.dp
|
|
||||||
height: 45 * DefaultStyle.dp
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
leftPadding: 15 * DefaultStyle.dp
|
leftPadding: 14 * DefaultStyle.dp
|
||||||
rightPadding: 14 * DefaultStyle.dp
|
rightPadding: 14 * DefaultStyle.dp
|
||||||
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DefaultStyle.grey_500
|
color: DefaultStyle.grey_500
|
||||||
radius: 10 * DefaultStyle.dp
|
radius: 10 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
spacing: 85 * DefaultStyle.dp
|
||||||
|
RowLayout {
|
||||||
|
spacing: 15 * DefaultStyle.dp
|
||||||
EffectImage {
|
EffectImage {
|
||||||
imageSource: AppIcons.recordFill
|
imageSource: AppIcons.recordFill
|
||||||
colorizationColor: DefaultStyle.danger_500main
|
colorizationColor: DefaultStyle.danger_500main
|
||||||
|
|
@ -447,6 +450,7 @@ AppWindow {
|
||||||
: mainWindow.conference ? qsTr("Un participant enregistre la réunion") : qsTr("Votre correspondant enregistre l'appel")
|
: mainWindow.conference ? qsTr("Un participant enregistre la réunion") : qsTr("Votre correspondant enregistre l'appel")
|
||||||
: ""
|
: ""
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Button {
|
Button {
|
||||||
visible: mainWindow.call && mainWindow.call.core.recording
|
visible: mainWindow.call && mainWindow.call.core.recording
|
||||||
text: qsTr("Arrêter l'enregistrement")
|
text: qsTr("Arrêter l'enregistrement")
|
||||||
|
|
@ -738,6 +742,7 @@ AppWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
console.log("call is paused", modelData.core.paused)
|
||||||
modelData.core.lSetPaused(!modelData.core.paused)
|
modelData.core.lSetPaused(!modelData.core.paused)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -280,11 +280,11 @@ Item {
|
||||||
CheckableButton {
|
CheckableButton {
|
||||||
id: muteIcon
|
id: muteIcon
|
||||||
icon.source: AppIcons.microphoneSlash
|
icon.source: AppIcons.microphoneSlash
|
||||||
Layout.preferredWidth: 18 * DefaultStyle.dp
|
Layout.preferredWidth: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
|
||||||
Layout.preferredHeight: 18 * DefaultStyle.dp
|
Layout.preferredHeight: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
|
||||||
visible: mainItem.mutedStatus
|
visible: mainItem.mutedStatus
|
||||||
icon.width: 19 * DefaultStyle.dp
|
icon.width: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
|
||||||
icon.height: 19 * DefaultStyle.dp
|
icon.height: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp)
|
||||||
enabled: false
|
enabled: false
|
||||||
contentImageColor: DefaultStyle.main2_500main
|
contentImageColor: DefaultStyle.main2_500main
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue