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) {
}
Camera::~Camera () {
if (m_is_preview)
CoreManager::getInstance()->getCore()->setNativePreviewWindowId(nullptr);
else
m_call->getLinphoneCall()->setNativeVideoWindowId(nullptr);
delete m_context_info;
}
......
......@@ -312,21 +312,30 @@ Rectangle {
}
}
// -----------------------------------------------------------------------
// Preview.
// -----------------------------------------------------------------------
Loader {
anchors.centerIn: parent
height: CallStyle.actionArea.userVideo.height
width: CallStyle.actionArea.userVideo.width
visible: incall.width >= CallStyle.actionArea.lowWidth && call.videoEnabled && !_fullscreen
Component {
id: preview
Camera {
anchors.fill: parent
call: incall.call
isPreview: true
Component.onCompleted: call = incall.call
}
}
sourceComponent: incall.width >= CallStyle.actionArea.lowWidth && call.videoEnabled && !_fullscreen
? preview
: null
}
ActionBar {
anchors {
right: parent.right
......
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