[mirotalksfu] - add global participant limit per room
هذا الالتزام موجود في:
@@ -73,6 +73,8 @@ module.exports = class Room {
|
||||
|
||||
// Share Media
|
||||
this.shareMediaData = {};
|
||||
|
||||
this.maxParticipants = config?.moderation?.room?.maxParticipants || 1000;
|
||||
}
|
||||
|
||||
// ####################################################
|
||||
@@ -104,6 +106,8 @@ module.exports = class Room {
|
||||
shareMediaData: this.shareMediaData,
|
||||
dominantSpeaker: this.activeSpeakerObserverEnabled,
|
||||
peers: JSON.stringify([...this.peers]),
|
||||
maxParticipants: this.maxParticipants,
|
||||
maxParticipantsReached: this.peers.size > this.maxParticipants,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1483,6 +1483,13 @@ function startServer() {
|
||||
redirect: config.features?.redirect?.enabled ? config.features.redirect : false,
|
||||
},
|
||||
|
||||
// Global Moderation & Management
|
||||
moderation: {
|
||||
room: {
|
||||
maxParticipants: config?.moderation?.room?.maxParticipants || 1000,
|
||||
},
|
||||
},
|
||||
|
||||
// Version Information
|
||||
versions: {
|
||||
app: packageJson?.version,
|
||||
|
||||
@@ -24,6 +24,7 @@ const dotenv = require('dotenv').config();
|
||||
const packageJson = require('../../package.json');
|
||||
const os = require('os');
|
||||
const fs = require('fs');
|
||||
const { Moderations } = require('openai/resources/moderations.js');
|
||||
const splitChar = ',';
|
||||
|
||||
// ==============================================
|
||||
@@ -1290,6 +1291,23 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Global Moderation Settings
|
||||
* ========================
|
||||
* Controls room participant limits and moderation features.
|
||||
* This section defines how many participants can join a room
|
||||
* and whether moderation features are enabled.
|
||||
* Core Settings:
|
||||
* - maxParticipants: Maximum number of participants allowed in a room
|
||||
* - moderation: Object containing moderation settings
|
||||
* - room: Object containing room-specific moderation settings
|
||||
*/
|
||||
moderation: {
|
||||
room: {
|
||||
maxParticipants: parseInt(process.env.ROOM_MAX_PARTICIPANTS) || 1000, // Maximum participants per room
|
||||
},
|
||||
},
|
||||
|
||||
// ==============================================
|
||||
// 9. Mediasoup (WebRTC) Configuration
|
||||
// ==============================================
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم