mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 22:58:15 +00:00
feat(ui/views/App/Calls/Incall): resize window if necessary on video call
This commit is contained in:
parent
711d1c66ca
commit
6707c5fcd5
2 changed files with 16 additions and 0 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue