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
This commit is contained in:
Mario Jr 2021-02-26 15:52:11 -03:00
parent e70470e975
commit fc1401ab53
2 changed files with 5 additions and 2 deletions

View File

@ -33,7 +33,7 @@ const audioEventHandler = (event) => {
switch (event.name) {
case 'started':
recoverMicState();
if (!event.isListenOnly) recoverMicState();
break;
default:
break;

View File

@ -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,
});
}
}