Commit 6707c5fc authored by Wescoeur's avatar Wescoeur

feat(ui/views/App/Calls/Incall): resize window if necessary on video call

parent 711d1c66
......@@ -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
......
......@@ -38,6 +38,7 @@ Rectangle {
Connections {
target: call
onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height)
onStatusChanged: Logic.handleStatusChanged (status)
onVideoRequested: Logic.handleVideoRequested()
}
......
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