mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 14:37:47 +00:00
feat(flags) add feature flag for audio-only button
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// @flow
|
||||
|
||||
import { toggleAudioOnly } from '../../../base/audio-only';
|
||||
import { AUDIO_ONLY_BUTTON_ENABLED, getFeatureFlag } from '../../../base/flags';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { IconAudioOnly, IconAudioOnlyOff } from '../../../base/icons';
|
||||
import { connect } from '../../../base/redux';
|
||||
@@ -60,16 +61,20 @@ class AudioOnlyButton extends AbstractButton<Props, *> {
|
||||
* {@code AudioOnlyButton} component.
|
||||
*
|
||||
* @param {Object} state - The Redux state.
|
||||
* @param {Object} ownProps - The properties explicitly passed to the component instance.
|
||||
* @private
|
||||
* @returns {{
|
||||
* _audioOnly: boolean
|
||||
* }}
|
||||
*/
|
||||
function _mapStateToProps(state): Object {
|
||||
function _mapStateToProps(state, ownProps): Object {
|
||||
const { enabled: audioOnly } = state['features/base/audio-only'];
|
||||
const enabledInFeatureFlags = getFeatureFlag(state, AUDIO_ONLY_BUTTON_ENABLED, true);
|
||||
const { visible = enabledInFeatureFlags } = ownProps;
|
||||
|
||||
return {
|
||||
_audioOnly: Boolean(audioOnly)
|
||||
_audioOnly: Boolean(audioOnly),
|
||||
visible
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user