[mirotalksfu] - #134 WIP add room broadcasting, bug fixing, update dep

هذا الالتزام موجود في:
Miroslav Pejic
2023-11-30 21:04:17 +01:00
الأصل 2e471c59bb
التزام f92ca94a58
10 ملفات معدلة مع 401 إضافات و106 حذوفات

عرض الملف

@@ -12,6 +12,9 @@ module.exports = class Room {
this.audioLevelObserver = null;
this.audioLevelObserverEnabled = true;
this.audioLastUpdateTime = 0;
// ##########################
this._isBroadcasting = false;
// ##########################
this._isLocked = false;
this._isLobbyEnabled = false;
this._roomPassword = null;
@@ -109,6 +112,11 @@ module.exports = class Room {
// ROOM MODERATOR
// ####################################################
updateRoomModeratorALL(data) {
this._moderator = data;
log.debug('Update room moderator all data', this._moderator);
}
updateRoomModerator(data) {
log.debug('Update room moderator', data);
switch (data.type) {
@@ -137,6 +145,7 @@ module.exports = class Room {
toJson() {
return {
id: this.id,
broadcasting: this._isBroadcasting,
config: {
isLocked: this._isLocked,
isLobbyEnabled: this._isLobbyEnabled,
@@ -312,6 +321,10 @@ module.exports = class Room {
// ROOM STATUS
// ####################################################
// GET
isBroadcasting() {
return this._isBroadcasting;
}
getPassword() {
return this._roomPassword;
}
@@ -324,6 +337,11 @@ module.exports = class Room {
isHostOnlyRecording() {
return this._hostOnlyRecording;
}
// SET
setIsBroadcasting(status) {
this._isBroadcasting = status;
}
setLocked(status, password) {
this._isLocked = status;
this._roomPassword = password;