mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Allow to activate camera on audio-only from the call window.
This commit is contained in:
parent
026124d7ba
commit
5d5d4d3941
1 changed files with 14 additions and 2 deletions
|
|
@ -489,14 +489,26 @@ Rectangle {
|
|||
backgroundRadius: 90
|
||||
colorSet: callModel && callModel.cameraEnabled ? IncallStyle.buttons.cameraOn : IncallStyle.buttons.cameraOff
|
||||
updating: callModel.videoEnabled && callModel.updating
|
||||
enabled: !mainItem.isAudioOnly
|
||||
property bool _activateCamera: false
|
||||
onClicked: if(callModel){
|
||||
if( callModel.isConference){// Only deactivate camera in conference.
|
||||
callModel.cameraEnabled = !callModel.cameraEnabled
|
||||
if(mainItem.isAudioOnly && SettingsModel.videoConferenceLayout != 2) {
|
||||
camera._activateCamera = true
|
||||
conferenceLayout.item.clearAll(SettingsModel.videoConferenceLayout)
|
||||
callModel.conferenceVideoLayout = SettingsModel.videoConferenceLayout
|
||||
}else
|
||||
callModel.cameraEnabled = !callModel.cameraEnabled
|
||||
}else{// In one-one, we deactivate all videos.
|
||||
callModel.videoEnabled = !callModel.videoEnabled
|
||||
}
|
||||
}
|
||||
Connections{// Enable camera only when status is ok
|
||||
target: callModel
|
||||
onStatusChanged: if( camera._activateCamera && (status == LinphoneEnums.CallStatusConnected || status == LinphoneEnums.CallStatusIdle)){
|
||||
camera._activateCamera = false
|
||||
callModel.cameraEnabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue