mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
* Add checkboxes to toggle audio settings * Sync checkboxes with audio mixer effect * Add tooltips * Move previewAudioTrack to redux * Add translation * Add audio settings state to redux * Update docs * Apply review comments * Create local track with audio contraints when unmuting * Refactor functions and naming * Add enableAdvancedAudioSettings config * Fix mobile imports * Add tooltips content * Update react/features/base/config/functions.any.ts * Layout checkboxes in a two-column grid * Fix web imports * Sort translation alphabetically * Separate audio mute implementation for mobile and web * Apply review comments * squash: Add imports for middleware.any * squash: fix linter errors * Remove tooltips * Lint * Refactored setting of audio constraints in createLocalTracksF with checks for feature flag and desktop --------- Co-authored-by: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com> Co-authored-by: Jaya Allamsetty <jaya.allamsetty@8x8.com>
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
|
import { IAudioSettings } from '../base/settings/reducer';
|
|
|
|
import {
|
|
SET_AUDIO_SETTINGS,
|
|
SET_AUDIO_SETTINGS_VISIBILITY,
|
|
SET_PREVIEW_AUDIO_TRACK,
|
|
SET_VIDEO_SETTINGS_VISIBILITY
|
|
} from './actionTypes';
|
|
|
|
export interface ISettingsState {
|
|
audioSettings?: IAudioSettings;
|
|
audioSettingsVisible?: boolean;
|
|
previewAudioTrack?: any | null;
|
|
videoSettingsVisible?: boolean;
|
|
}
|
|
|
|
ReducerRegistry.register('features/settings', (state: ISettingsState = {}, action) => {
|
|
switch (action.type) {
|
|
case SET_AUDIO_SETTINGS_VISIBILITY:
|
|
return {
|
|
...state,
|
|
audioSettingsVisible: action.value
|
|
};
|
|
case SET_VIDEO_SETTINGS_VISIBILITY:
|
|
return {
|
|
...state,
|
|
videoSettingsVisible: action.value
|
|
};
|
|
case SET_PREVIEW_AUDIO_TRACK:
|
|
return {
|
|
...state,
|
|
previewAudioTrack: action.track
|
|
};
|
|
case SET_AUDIO_SETTINGS:
|
|
return {
|
|
...state,
|
|
audioSettings: action.settings
|
|
};
|
|
}
|
|
|
|
return state;
|
|
});
|