diff --git a/linphone-desktop/ui/views/App/Calls/Incall.js b/linphone-desktop/ui/views/App/Calls/Incall.js index 78e4df526..e33ba2214 100644 --- a/linphone-desktop/ui/views/App/Calls/Incall.js +++ b/linphone-desktop/ui/views/App/Calls/Incall.js @@ -23,6 +23,21 @@ function handleCallStatisticsClosed () { }) } +function handleCameraFirstFrameReceived (width, height) { + // Cell phone??? + if (height > width) { + return + } + + var ratio = container.width / (width / (height / container.height)) + var diff = container.height * ratio - container.height + if (diff < 0) { + return + } + + window.height += diff +} + function handleStatusChanged (status) { if (status === Linphone.CallModel.CallStatusEnded) { var fullscreen = incall._fullscreen diff --git a/linphone-desktop/ui/views/App/Calls/Incall.qml b/linphone-desktop/ui/views/App/Calls/Incall.qml index 454d945ea..8d5af8c9f 100644 --- a/linphone-desktop/ui/views/App/Calls/Incall.qml +++ b/linphone-desktop/ui/views/App/Calls/Incall.qml @@ -38,6 +38,7 @@ Rectangle { Connections { target: call + onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height) onStatusChanged: Logic.handleStatusChanged (status) onVideoRequested: Logic.handleVideoRequested() }