Commit 50d9baf9 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/views/App/Calls/Incall): display correctly preview

parent 68529e33
...@@ -136,6 +136,11 @@ Camera::Camera (QQuickItem *parent) : QQuickFramebufferObject(parent) { ...@@ -136,6 +136,11 @@ Camera::Camera (QQuickItem *parent) : QQuickFramebufferObject(parent) {
} }
Camera::~Camera () { Camera::~Camera () {
if (m_is_preview)
CoreManager::getInstance()->getCore()->setNativePreviewWindowId(nullptr);
else
m_call->getLinphoneCall()->setNativeVideoWindowId(nullptr);
delete m_context_info; delete m_context_info;
} }
......
...@@ -312,19 +312,28 @@ Rectangle { ...@@ -312,19 +312,28 @@ Rectangle {
} }
} }
// -----------------------------------------------------------------------
// Preview.
// -----------------------------------------------------------------------
Loader { Loader {
anchors.centerIn: parent anchors.centerIn: parent
height: CallStyle.actionArea.userVideo.height height: CallStyle.actionArea.userVideo.height
width: CallStyle.actionArea.userVideo.width width: CallStyle.actionArea.userVideo.width
visible: incall.width >= CallStyle.actionArea.lowWidth && call.videoEnabled && !_fullscreen Component {
id: preview
Camera {
anchors.fill: parent
isPreview: true
Component.onCompleted: call = incall.call Camera {
anchors.fill: parent
call: incall.call
isPreview: true
}
} }
sourceComponent: incall.width >= CallStyle.actionArea.lowWidth && call.videoEnabled && !_fullscreen
? preview
: null
} }
ActionBar { ActionBar {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment