mirror of
https://github.com/livekit/livekit.git
synced 2026-03-31 21:55:41 +00:00
fixed logic error in speaker updates
This commit is contained in:
@@ -538,7 +538,7 @@ func (r *Room) audioUpdateWorker() {
|
||||
}
|
||||
|
||||
// see if an update is needed
|
||||
if len(speakers) == 0 && len(r.lastActiveSpeakers) == 0 {
|
||||
if len(speakers) == len(r.lastActiveSpeakers) {
|
||||
for i, speaker := range speakers {
|
||||
if speaker.Sid != r.lastActiveSpeakers[i].Sid || speaker.Level != r.lastActiveSpeakers[i].Level {
|
||||
r.sendSpeakerUpdates(speakers)
|
||||
|
||||
Reference in New Issue
Block a user