Handle video/no video updates from Active Speaker

This commit is contained in:
Christophe Deschamps 2022-10-03 14:56:21 +02:00
parent 468706fb0e
commit d4e5c1fed8
2 changed files with 5 additions and 2 deletions

View file

@ -142,6 +142,7 @@ class ControlsViewModel {
if let currentCall = core.currentCall {
if (currentCall.conference != nil) {
if let params = try?core.createCallParams(call: currentCall) {
isVideoUpdateInProgress.value = true
params.videoDirection = params.videoDirection == MediaDirection.RecvOnly ? MediaDirection.SendRecv : MediaDirection.RecvOnly
try?currentCall.update(params: params)
}

View file

@ -125,8 +125,10 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol
}
model.speakingParticipant.readCurrentAndObserve { speakingParticipant in
if (model.activeSpeakerConferenceParticipantDevices.value!.count > 1) {
self.fillActiveSpeakerSpace(data: speakingParticipant,video: speakingParticipant?.videoEnabled.value == true)
self.muted.isHidden = true
speakingParticipant?.videoEnabled.readCurrentAndObserve { video in
self.fillActiveSpeakerSpace(data: speakingParticipant,video: video == true)
self.muted.isHidden = true
}
}
}
}