[mirotalksfu] - WIP lobby

هذا الالتزام موجود في:
Miroslav Pejic
2025-09-10 22:50:07 +02:00
الأصل 831e80ac67
التزام 76064a2ef9
3 ملفات معدلة مع 14 إضافات و14 حذوفات

عرض الملف

@@ -107,6 +107,7 @@ module.exports = class Room {
shareMediaData: this.shareMediaData,
dominantSpeaker: this.activeSpeakerObserverEnabled,
peers: JSON.stringify([...this.peers]),
peersCount: this.getPeersCount(),
maxParticipants: this.maxParticipants,
maxParticipantsReached: this.peers.size > this.maxParticipants,
globalLobby: this.globalLobby,

عرض الملف

@@ -1923,7 +1923,7 @@ function startServer() {
return cb('isLocked');
}
if (room.isLobbyEnabled() && !isPresenter) {
if ((room.isLobbyEnabled() || room.isGlobalLobbyEnabled()) && !isPresenter) {
log.debug(
'The user is currently waiting to join the room because the lobby is enabled, and they are not a presenter'
);
@@ -1935,11 +1935,6 @@ function startServer() {
return cb('isLobby');
}
if (room.isGlobalLobbyEnabled() && !isPresenter) {
log.debug('The user is currently waiting to join the room because the global lobby is enabled');
return cb('isGlobalLobby');
}
if ((hostCfg.protected || hostCfg.user_auth) && isPresenter && !hostCfg.users_from_db) {
const roomAllowedForUser = isRoomAllowedForUser('[Join]', peer_name, room.id);
if (!roomAllowedForUser) {
@@ -2409,6 +2404,10 @@ function startServer() {
room.setLocked(false);
room.broadCast(socket.id, 'roomAction', data.action);
break;
case 'globalLobbyOn':
if (!room.isGlobalLobbyEnabled()) return;
room.setLobbyEnabled(true);
break;
case 'lobbyOn':
if (!isPresenter) return;
room.setLobbyEnabled(true);