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

This commit is contained in:
Wescoeur 2017-06-14 01:33:39 +02:00
parent 711d1c66ca
commit 6707c5fcd5
2 changed files with 16 additions and 0 deletions

View file

@ -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

View file

@ -38,6 +38,7 @@ Rectangle {
Connections {
target: call
onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height)
onStatusChanged: Logic.handleStatusChanged (status)
onVideoRequested: Logic.handleVideoRequested()
}