From fc1401ab5378869273fbb639bafe29067d98bd01 Mon Sep 17 00:00:00 2001 From: Mario Jr <mariogasparoni@gmail.com> Date: Fri, 26 Feb 2021 15:52:11 -0300 Subject: [PATCH] Do not try to recover mute state when joining listenonly Prevent toggleMute api call to be called for listenonly This has no effect to the end user, but avoids unnecessary server calls --- bigbluebutton-html5/imports/ui/components/audio/service.js | 2 +- .../imports/ui/services/audio-manager/index.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/audio/service.js b/bigbluebutton-html5/imports/ui/components/audio/service.js index f72b17c8c3..21a11fb232 100755 --- a/bigbluebutton-html5/imports/ui/components/audio/service.js +++ b/bigbluebutton-html5/imports/ui/components/audio/service.js @@ -33,7 +33,7 @@ const audioEventHandler = (event) => { switch (event.name) { case 'started': - recoverMicState(); + if (!event.isListenOnly) recoverMicState(); break; default: break; diff --git a/bigbluebutton-html5/imports/ui/services/audio-manager/index.js b/bigbluebutton-html5/imports/ui/services/audio-manager/index.js index f4d5d68a90..2baf9fc7f8 100755 --- a/bigbluebutton-html5/imports/ui/services/audio-manager/index.js +++ b/bigbluebutton-html5/imports/ui/services/audio-manager/index.js @@ -342,7 +342,10 @@ class AudioManager { this.notify(this.intl.formatMessage(this.messages.info.JOINED_AUDIO)); logger.info({ logCode: 'audio_joined' }, 'Audio Joined'); if (STATS.enabled) this.monitor(); - this.audioEventHandler({ name: 'started' }); + this.audioEventHandler({ + name: 'started', + isListenOnly: this.isListenOnly, + }); } } -- GitLab