Fallback to AS if MaxPart > 6 only if Grid is active

This commit is contained in:
Christophe Deschamps 2022-06-23 09:48:40 +02:00
parent 67e20f3175
commit 7d9c923a79

View file

@ -64,8 +64,8 @@ class ConferenceViewModel {
Log.i("[Conference] \(conference) Participant \(participant) added")
self.updateParticipantsList(conference)
let count = self.conferenceParticipantDevices.value!.count
if (count > self.maxParticipantsForMosaicLayout) {
Log.w("[Conference] \(conference) More than \(self.maxParticipantsForMosaicLayout) participants \(count), forcing active speaker layout")
if (count > self.maxParticipantsForMosaicLayout && conference.currentParams?.videoEnabled == true && conference.call?.currentParams?.conferenceVideoLayout == .Grid) {
Log.w("[Conference] \(conference) More than \(self.maxParticipantsForMosaicLayout) participants \(count), forcing active speaker layout from Grid")
self.conferenceDisplayMode.value = .ActiveSpeaker
self.changeLayout(layout: .ActiveSpeaker)
}