Fix active speaker where preview could be seen (because of binding loop on participant count)

This commit is contained in:
Julien Wadel 2022-10-11 16:14:51 +02:00
parent edf2c3c71e
commit 16c1ff35bb
2 changed files with 7 additions and 4 deletions

View file

@ -55,8 +55,8 @@ Rectangle {
interval: 100
onTriggered: updateMessageBanner()
}
onParticipantCountChanged: delayMessageBanner.restart()
onIsReadyChanged: delayMessageBanner.restart()
onParticipantCountChanged: Qt.callLater(function (){delayMessageBanner.restart()})
onIsReadyChanged: Qt.callLater(function (){delayMessageBanner.restart()})
// ---------------------------------------------------------------------------
color: IncallStyle.backgroundColor

View file

@ -29,7 +29,7 @@ Item {
property int participantCount: callModel.isConference ? allDevices.count + 1 : 2 // +me. allDevices==0 if !conference
onParticipantCountChanged: {console.log("Conf count: " +participantCount);allDevices.updateCurrentDevice()}
onParticipantCountChanged: {console.log("Conf count: " +participantCount); Qt.callLater(allDevices.updateCurrentDevice)}
property ParticipantDeviceProxyModel participantDevices : ParticipantDeviceProxyModel {
id: allDevices
@ -81,7 +81,10 @@ Item {
onDeactivateCameraChanged: console.log("deactivateCamera? "+deactivateCamera)
isPreview: !preview.visible && mainItem.participantCount == 1
onIsPreviewChanged: {
console.log("ispreview ? " +isPreview)
console.log("ispreview ? " +isPreview + "visible?"+preview.visible +", pCount="+mainItem.participantCount
+" / ready?" +mainItem.isConferenceReady
+" / allCount=" +allDevices.count
)
if( isPreview){
currentDevice = allDevices.me
cameraView.resetCamera()