1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-04 14:55:43 +02:00

videoview: don't close the device when a video call is present

Gitlab: #627
Change-Id: I5d892fc49b1605984481c810dcd43994258c845d
This commit is contained in:
Andreas Traczyk 2021-12-20 15:05:17 -05:00
parent 538481a9f8
commit 3b97741afb
2 changed files with 5 additions and 13 deletions

View file

@ -33,7 +33,7 @@ Rectangle {
id: root id: root
property var accountPeerPair: ["", ""] property var accountPeerPair: ["", ""]
property variant clickPos: "1,1" property string clickPos: "1,1"
property int previewMargin: 15 property int previewMargin: 15
property int previewMarginYTop: previewMargin + 42 property int previewMarginYTop: previewMargin + 42
property int previewMarginYBottom: previewMargin + 84 property int previewMarginYBottom: previewMargin + 84
@ -44,14 +44,6 @@ Rectangle {
property var linkedWebview: null property var linkedWebview: null
property string callPreviewId: "" property string callPreviewId: ""
onCallPreviewIdChanged: {
testLog("\n\n CHANGING CALLPREVIEWID" + root.callPreviewId + " " + previewRenderer.rendererId + " \n\n")
}
function testLog(txt) {
console.log(this, txt)
}
color: "black" color: "black"
onAccountPeerPairChanged: { onAccountPeerPairChanged: {
@ -194,7 +186,7 @@ Rectangle {
rendererId: root.callPreviewId rendererId: root.callPreviewId
onVisibleChanged: { onVisibleChanged: {
if (!visible) { if (!visible && !AccountAdapter.hasVideoCall()) {
VideoDevices.stopDevice(rendererId, true) VideoDevices.stopDevice(rendererId, true)
} }
} }
@ -291,8 +283,8 @@ Rectangle {
function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted, function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted,
isSIP, isConferenceCall, isGrid, previewId) { isSIP, isConferenceCall, isGrid, previewId) {
if (previewId != "") { if (previewId !== "") {
if (root.callPreviewId != previewId) if (root.callPreviewId !== previewId)
VideoDevices.stopDevice(root.callPreviewId, true) VideoDevices.stopDevice(root.callPreviewId, true)
VideoDevices.startDevice(previewId) VideoDevices.startDevice(previewId)
} else { } else {