Fix screen share calls

This commit is contained in:
Nicolas Werner 2022-03-13 20:40:09 +01:00
parent e98145daec
commit 4f44b63a49
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 18 additions and 17 deletions

View file

@ -108,10 +108,15 @@ Popup {
text: qsTr("Screen") text: qsTr("Screen")
icon.source: "qrc:/icons/icons/ui/screen-share.svg" icon.source: "qrc:/icons/icons/ui/screen-share.svg"
onClicked: { onClicked: {
var dialog = screenShareDialog.createObject(timelineRoot); if (buttonLayout.validateMic()) {
dialog.open(); Settings.microphone = micCombo.currentText;
timelineRoot.destroyOnClose(dialog); Settings.camera = cameraCombo.currentText;
close();
var dialog = screenShareDialog.createObject(timelineRoot);
dialog.open();
timelineRoot.destroyOnClose(dialog);
close();
}
} }
} }

View file

@ -83,7 +83,7 @@ Popup {
id: pipCheckBox id: pipCheckBox
enabled: CallManager.cameras.length > 0 enabled: CallManager.cameras.length > 0
checked: Settings.screenSharePiP checked: CallManager.cameras.length > 0 && Settings.screenSharePiP
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
@ -125,19 +125,15 @@ Popup {
Button { Button {
text: qsTr("Share") text: qsTr("Share")
icon.source: "qrc:/icons/icons/ui/screen-share.svg" icon.source: "qrc:/icons/icons/ui/screen-share.svg"
onClicked: {
if (buttonLayout.validateMic()) {
Settings.microphone = micCombo.currentText;
if (pipCheckBox.checked)
Settings.camera = cameraCombo.currentText;
Settings.screenShareFrameRate = frameRateCombo.currentText; onClicked: {
Settings.screenSharePiP = pipCheckBox.checked; Settings.screenShareFrameRate = frameRateCombo.currentText;
Settings.screenShareRemoteVideo = remoteVideoCheckBox.checked; Settings.screenSharePiP = pipCheckBox.checked;
Settings.screenShareHideCursor = hideCursorCheckBox.checked; Settings.screenShareRemoteVideo = remoteVideoCheckBox.checked;
CallManager.sendInvite(room.roomId, CallType.SCREEN, windowCombo.currentIndex); Settings.screenShareHideCursor = hideCursorCheckBox.checked;
close();
} CallManager.sendInvite(room.roomId, CallType.SCREEN, windowCombo.currentIndex);
close();
} }
} }