mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 04:53:04 +00:00
feat(ui/views/App/IncallFullscreenWindow): do not create camera view if camera is used in incall window
This commit is contained in:
parent
20eba3ab9a
commit
aa0275044d
2 changed files with 41 additions and 15 deletions
|
|
@ -16,6 +16,10 @@ Rectangle {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
readonly property bool cameraActivated:
|
||||
cameraLoader.status !== Loader.Null ||
|
||||
cameraPreviewLoader.status !== Loader.Null
|
||||
|
||||
property var call
|
||||
|
||||
property var _contactObserver: SipAddressesModel.getContactObserver(sipAddress)
|
||||
|
|
@ -30,7 +34,8 @@ Rectangle {
|
|||
|
||||
_fullscreen = Utils.openWindow('IncallFullscreenWindow', incall, {
|
||||
properties: {
|
||||
call: incall.call
|
||||
call: incall.call,
|
||||
callsWindow: incall
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -253,19 +258,30 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: camera
|
||||
Loader {
|
||||
id: cameraLoader
|
||||
|
||||
Camera {
|
||||
height: container.height
|
||||
width: container.width
|
||||
call: incall.call
|
||||
anchors.centerIn: parent
|
||||
|
||||
active: call.videoEnabled && !_fullscreen
|
||||
sourceComponent: camera
|
||||
|
||||
Component {
|
||||
id: camera
|
||||
|
||||
Camera {
|
||||
call: incall.call
|
||||
height: container.height
|
||||
width: container.width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
anchors.centerIn: parent
|
||||
sourceComponent: call.videoEnabled && !_fullscreen ? camera : avatar
|
||||
|
||||
active: !call.videoEnabled || _fullscreen
|
||||
sourceComponent: avatar
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -363,12 +379,17 @@ Rectangle {
|
|||
// -----------------------------------------------------------------------
|
||||
|
||||
Loader {
|
||||
id: cameraPreviewLoader
|
||||
|
||||
anchors.centerIn: parent
|
||||
height: CallStyle.actionArea.userVideo.height
|
||||
width: CallStyle.actionArea.userVideo.width
|
||||
|
||||
active: incall.width >= CallStyle.actionArea.lowWidth && call.videoEnabled && !_fullscreen
|
||||
sourceComponent: cameraPreview
|
||||
|
||||
Component {
|
||||
id: preview
|
||||
id: cameraPreview
|
||||
|
||||
Camera {
|
||||
anchors.fill: parent
|
||||
|
|
@ -376,10 +397,6 @@ Rectangle {
|
|||
isPreview: true
|
||||
}
|
||||
}
|
||||
|
||||
sourceComponent: incall.width >= CallStyle.actionArea.lowWidth && call.videoEnabled && !_fullscreen
|
||||
? preview
|
||||
: null
|
||||
}
|
||||
|
||||
ActionBar {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ Window {
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
property var call
|
||||
property var callsWindow
|
||||
|
||||
property bool hideButtons: false
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
@ -49,11 +51,18 @@ Window {
|
|||
|
||||
Keys.onEscapePressed: incall.close()
|
||||
|
||||
Camera {
|
||||
Component {
|
||||
id: camera
|
||||
|
||||
Camera {
|
||||
call: incall.call
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
call: incall.call
|
||||
active: !incall.callsWindow.cameraActivated
|
||||
sourceComponent: camera
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue