add support for muting/unmuting non moderators in a conference

This commit is contained in:
Dave Horton
2021-09-25 12:31:20 -04:00
parent 7cf342eeb8
commit 708c13d5f6
2 changed files with 24 additions and 0 deletions

View File

@@ -379,6 +379,19 @@ class Conference extends Task {
this.emitter.emit('join', opts);
}
async doConferenceMuteNonModerators(cs, mute) {
assert (cs.isInConference);
this.logger.info(`Conference:doConferenceMuteNonModerators ${mute ? 'muting' : 'unmuting'} non-moderators`);
this.ep.api(`conference ${this.confName} ${mute ? 'mute' : 'unmute'} non_moderator`)
.catch((err) => this.logger.info({err}, 'Error muting or unmuting non_moderators'));
if (this.conf_hold_status !== 'hold' && this._playSession) {
this._playSession.kill();
this._playSession = null;
}
}
async doConferenceHold(cs, opts) {
assert (cs.isInConference);