Ok!
Thanks to your tip, we’ve moved the lobby activation to this point in the conference.js class:
room.on(JitsiConferenceEvents.USER_ROLE_CHANGED, (id, role) => {
if (this.isLocalId(id)) {
logger.info(`My role changed, new role: ${role}`);
APP.store.dispatch(localParticipantRoleChanged(role));
APP.API.notifyUserRoleChanged(id, role);
if (role == 'moderator') {
APP.store.dispatch(toggleLobbyMode(true));
}
} else {
APP.store.dispatch(participantRoleChanged(id, role));
}
});
I state that in our solution we have set the single moderator.
When the lobby is active there is a problem in which the moderator, by mistake leaving the room, is no longer able to re-enter it.
We solved it by forcibly exiting all participants:
room.on(JitsiConferenceEvents.USER_LEFT, (id, user) => {
// The logic shared between RN and web.
commonUserLeftHandling(APP.store, room, user);
if (user.isHidden()) {
return;
}
logger.log(`USER ${id} LEFT:`, user);
APP.UI.onSharedVideoStop(id);
if (user.getRole() == 'moderator') {
this.leaveRoomAndDisconnect();
}
});
What do you think about it?