[mirotalksfu] - add moderator

هذا الالتزام موجود في:
Miroslav Pejic
2023-11-15 18:23:20 +01:00
الأصل b3a6c254c9
التزام cfbe8a3e5f
11 ملفات معدلة مع 168 إضافات و58 حذوفات

عرض الملف

@@ -16,6 +16,10 @@ module.exports = class Room {
this._isLobbyEnabled = false;
this._roomPassword = null;
this._hostOnlyRecording = false;
this._moderator = {
start_audio_muted: false,
start_video_hidden: false,
};
this.survey = config.survey;
this.redirect = config.redirect;
this.peers = new Map();
@@ -98,6 +102,23 @@ module.exports = class Room {
return this.router.rtpCapabilities;
}
// ####################################################
// ROOM MODERATOR
// ####################################################
updateRoomModerator(data) {
log.debug('Update room moderator', data);
switch (data.type) {
case 'audio':
this._moderator.start_audio_muted = data.status;
break;
case 'video':
this._moderator.start_video_hidden = data.status;
default:
break;
}
}
// ####################################################
// ROOM INFO
// ####################################################
@@ -110,6 +131,7 @@ module.exports = class Room {
isLobbyEnabled: this._isLobbyEnabled,
hostOnlyRecording: this._hostOnlyRecording,
},
moderator: this._moderator,
survey: this.survey,
redirect: this.redirect,
peers: JSON.stringify([...this.peers]),