From c89d7f93f357ccdc934468d6edf3a24b6e21badd Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Fri, 28 Jan 2022 20:57:00 +0100 Subject: [PATCH] [mirotalksfu] - disable audio level obs. --- app/src/Room.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/Room.js b/app/src/Room.js index 9366d1d9..d2aa3682 100644 --- a/app/src/Room.js +++ b/app/src/Room.js @@ -10,6 +10,7 @@ module.exports = class Room { this.worker = worker; this.router = null; this.audioLevelObserver = null; + this.audioLevelObserverEnabled = false; this.io = io; this._isLocked = false; this._roomPassword = null; @@ -30,7 +31,9 @@ module.exports = class Room { .then( function (router) { this.router = router; - this.startAudioLevelObservation(router); + if (this.audioLevelObserverEnabled) { + this.startAudioLevelObservation(router); + } }.bind(this), ); } @@ -75,7 +78,9 @@ module.exports = class Room { } addProducerToAudioLevelObserver(producer) { - this.audioLevelObserver.addProducer(producer); + if (this.audioLevelObserverEnabled) { + this.audioLevelObserver.addProducer(producer); + } } getRtpCapabilities() {