VideoRoom plugin issue
liqiang-xxfy opened this issue · 2 comments
liqiang-xxfy commented
VideoRoom plugin: Other people in the room cannot receive the “destroyed” message.
It can be received in Janus gateway.
jamken commented
according to the flowing code, janus-proxy should send the "destroyed" message to all participants when the room is destroyed.
def destroy(self):
if self._has_destroyed:
return
self._has_destroyed = True
participants = self._participants.values()
self._participants.clear()
self._private_id.clear()
# Notify all participants that the fun is over, and that they'll be kicked
log.debug("Notifying all participants")
destroyed_event = {
'videoroom': 'destroyed',
'room': self.room_id,
}
for publisher in participants:
publisher.push_videoroom_event(destroyed_event)
publisher.room = None # already removed from room, no need to call back room's on_participant destroy()
publisher.room_id = 0
publisher.destroy()
I will check this case again, thanks
jamken commented
I have found the problem, the participants list become empty after self._participants.clear().
this is a bug, thanks for figure out