diff --git a/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx b/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx index 4ad6c6787ac53f259c3f57d2a886273f17b5d20f..d549e5a97cc07bd8469a50f9aa4bf38b606a3d19 100644 --- a/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx @@ -9,6 +9,10 @@ import { styles } from '../styles'; import VideoService from '/imports/ui/components/video-provider/service'; const MIN_FONTSIZE = 0; +const SHOW_AUDIO_FILTERS = (Meteor.settings.public.app + .showAudioFilters === undefined) + ? true + : Meteor.settings.public.app.showAudioFilters; const intlMessages = defineMessages({ applicationSectionTitle: { @@ -204,6 +208,43 @@ class ApplicationMenu extends BaseMenu { this.handleUpdateSettings('application', obj.settings); } + renderAudioFilters() { + let audioFilterOption = null; + + if (SHOW_AUDIO_FILTERS) { + const { intl, showToggleLabel, displaySettingsStatus } = this.props; + const { settings } = this.state; + const audioFilterStatus = ApplicationMenu + .isAudioFilterEnabled(settings.microphoneConstraints); + + audioFilterOption = ( + <div className={styles.row}> + <div className={styles.col} aria-hidden="true"> + <div className={styles.formElement}> + <span className={styles.label}> + {intl.formatMessage(intlMessages.audioFilterLabel)} + </span> + </div> + </div> + <div className={styles.col}> + <div className={cx(styles.formElement, styles.pullContentRight)}> + {displaySettingsStatus(audioFilterStatus)} + <Toggle + icons={false} + defaultChecked={this.state.audioFilterEnabled} + onChange={() => this.handleAudioFilterChange()} + ariaLabel={intl.formatMessage(intlMessages.audioFilterLabel)} + showToggleLabel={showToggleLabel} + /> + </div> + </div> + </div> + ); + } + + return audioFilterOption; + } + renderPaginationToggle() { // See VideoService's method for an explanation if (!VideoService.shouldRenderPaginationToggle()) return; @@ -290,28 +331,7 @@ class ApplicationMenu extends BaseMenu { </div> </div> - <div className={styles.row}> - <div className={styles.col} aria-hidden="true"> - <div className={styles.formElement}> - <label className={styles.label}> - {intl.formatMessage(intlMessages.audioFilterLabel)} - </label> - </div> - </div> - <div className={styles.col}> - <div className={cx(styles.formElement, styles.pullContentRight)}> - {displaySettingsStatus(ApplicationMenu.isAudioFilterEnabled(settings.microphoneConstraints))} - <Toggle - icons={false} - defaultChecked={this.state.audioFilterEnabled} - onChange={() => this.handleAudioFilterChange()} - ariaLabel={intl.formatMessage(intlMessages.audioFilterLabel)} - showToggleLabel={showToggleLabel} - /> - </div> - </div> - </div> - + {this.renderAudioFilters()} {this.renderPaginationToggle()} <div className={styles.row}> diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index 2f6a4bdd74094cdf37048323a2e4e19158ffd7f2..1ecc7952b2006cd99478c447c75c93151d5d8d4b 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -68,6 +68,13 @@ public: # https://github.com/bigbluebutton/bigbluebutton/pull/10826 customHeartbeat: false showAllAvailableLocales: true + # Show "Audio Filters for Microphone" option in settings menu. + # When set to true, users are able to enable/disable microphone constraints, + # otherwise default values for 'microphoneConstraints' option + # are used. + # For more info, see 'microphoneConstraints' option in this config. + # If not set, default value is true. + showAudioFilters: true defaultSettings: application: animations: true