mirror of
https://github.com/livekit/livekit.git
synced 2026-06-06 08:22:13 +00:00
fix activeRecording (#1132)
* fix activeRecording * also check if p is nil
This commit is contained in:
+6
-6
@@ -369,19 +369,19 @@ func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity, reason ty
|
||||
}
|
||||
}
|
||||
|
||||
activeRecording := false
|
||||
if (p != nil && p.IsRecorder()) || p == nil && r.protoRoom.ActiveRecording {
|
||||
if (p != nil && p.IsRecorder()) || r.protoRoom.ActiveRecording {
|
||||
activeRecording := false
|
||||
for _, op := range r.participants {
|
||||
if op.IsRecorder() {
|
||||
activeRecording = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if r.protoRoom.ActiveRecording != activeRecording {
|
||||
r.protoRoom.ActiveRecording = activeRecording
|
||||
r.sendRoomUpdateLocked()
|
||||
if r.protoRoom.ActiveRecording != activeRecording {
|
||||
r.protoRoom.ActiveRecording = activeRecording
|
||||
r.sendRoomUpdateLocked()
|
||||
}
|
||||
}
|
||||
r.lock.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user