feat(agc): Add setting to disable automatic gain control (#582)
In some OS/Chromium combinations the automatic gain control goes slightly crazy, but normally its fine. Thus keep the default as is, but add an option for the users to disable it if required. Closes: #564
This commit is contained in:
parent
4b4148388d
commit
22b3406613
|
@ -34,6 +34,11 @@ type Props = {
|
|||
*/
|
||||
_alwaysOnTopWindowEnabled: boolean;
|
||||
|
||||
/**
|
||||
* Disable automatic gain control.
|
||||
*/
|
||||
_disableAGC: boolean;
|
||||
|
||||
/**
|
||||
* Email of user.
|
||||
*/
|
||||
|
@ -211,6 +216,7 @@ class Conference extends Component<Props, State> {
|
|||
};
|
||||
|
||||
const configOverwrite = {
|
||||
disableAGC: this.props._disableAGC,
|
||||
startWithAudioMuted: this.props._startWithAudioMuted,
|
||||
startWithVideoMuted: this.props._startWithVideoMuted
|
||||
};
|
||||
|
@ -403,6 +409,7 @@ class Conference extends Component<Props, State> {
|
|||
function _mapStateToProps(state: Object) {
|
||||
return {
|
||||
_alwaysOnTopWindowEnabled: getSetting(state, 'alwaysOnTopWindowEnabled', true),
|
||||
_disableAGC: state.settings.disableAGC,
|
||||
_email: state.settings.email,
|
||||
_name: state.settings.name,
|
||||
_serverURL: state.settings.serverURL,
|
||||
|
|
|
@ -19,6 +19,16 @@ export const SET_ALWAYS_ON_TOP_WINDOW_ENABLED
|
|||
*/
|
||||
export const SET_AUDIO_MUTED = Symbol('SET_AUDIO_MUTED');
|
||||
|
||||
/**
|
||||
* The type of (redux) action that sets disable AGC.
|
||||
*
|
||||
* @type {
|
||||
* type: SET_DISABLE_AGC,
|
||||
* disableAGC: boolean
|
||||
* }
|
||||
*/
|
||||
export const SET_DISABLE_AGC = Symbol('SET_DISABLE_AGC');
|
||||
|
||||
/**
|
||||
* The type of (redux) action that sets the email of the user.
|
||||
*
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import {
|
||||
SET_ALWAYS_ON_TOP_WINDOW_ENABLED,
|
||||
SET_AUDIO_MUTED,
|
||||
SET_DISABLE_AGC,
|
||||
SET_EMAIL,
|
||||
SET_NAME,
|
||||
SET_SERVER_URL,
|
||||
|
@ -108,6 +109,21 @@ export function setStartWithVideoMuted(startWithVideoMuted: boolean) {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Set disable AGC.
|
||||
*
|
||||
* @param {boolean} disableAGC - Whether to disable AGC.
|
||||
* @returns {{
|
||||
* type: SET_DISABLE_AGC,
|
||||
* disableAGC: boolean
|
||||
* }}
|
||||
*/
|
||||
export function setDisableAGC(disableAGC: boolean) {
|
||||
return {
|
||||
type: SET_DISABLE_AGC,
|
||||
disableAGC
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Set window always on top.
|
||||
|
|
|
@ -17,7 +17,7 @@ import { Onboarding, advenaceSettingsSteps, startOnboarding } from '../../onboar
|
|||
import { Form, SettingsContainer, TogglesContainer } from '../styled';
|
||||
import {
|
||||
setEmail, setName, setWindowAlwaysOnTop,
|
||||
setStartWithAudioMuted, setStartWithVideoMuted
|
||||
setStartWithAudioMuted, setStartWithVideoMuted, setDisableAGC
|
||||
} from '../actions';
|
||||
|
||||
import SettingToggle from './SettingToggle';
|
||||
|
@ -163,6 +163,10 @@ class SettingsDrawer extends Component<Props, *> {
|
|||
settingChangeEvent = { setWindowAlwaysOnTop }
|
||||
settingName = 'alwaysOnTopWindowEnabled' />
|
||||
</SpotlightTarget>
|
||||
<SettingToggle
|
||||
label = { t('settings.disableAGC') }
|
||||
settingChangeEvent = { setDisableAGC }
|
||||
settingName = 'disableAGC' />
|
||||
</TogglesContainer>
|
||||
</Panel>
|
||||
<Onboarding section = 'settings-drawer' />
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import {
|
||||
SET_ALWAYS_ON_TOP_WINDOW_ENABLED,
|
||||
SET_AUDIO_MUTED,
|
||||
SET_DISABLE_AGC,
|
||||
SET_EMAIL,
|
||||
SET_NAME,
|
||||
SET_SERVER_URL,
|
||||
|
@ -12,6 +13,7 @@ import {
|
|||
|
||||
type State = {
|
||||
alwaysOnTopWindowEnabled: boolean,
|
||||
disableAGC: boolean,
|
||||
email: string,
|
||||
name: string,
|
||||
serverURL: ?string,
|
||||
|
@ -24,6 +26,7 @@ const username = window.jitsiNodeAPI.osUserInfo().username;
|
|||
|
||||
const DEFAULT_STATE = {
|
||||
alwaysOnTopWindowEnabled: true,
|
||||
disableAGC: false,
|
||||
email: '',
|
||||
name: username,
|
||||
serverURL: undefined,
|
||||
|
@ -53,6 +56,12 @@ export default (state: State = DEFAULT_STATE, action: Object) => {
|
|||
startWithAudioMuted: action.startWithAudioMuted
|
||||
};
|
||||
|
||||
case SET_DISABLE_AGC:
|
||||
return {
|
||||
...state,
|
||||
disableAGC: action.disableAGC
|
||||
};
|
||||
|
||||
case SET_EMAIL:
|
||||
return {
|
||||
...state,
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"invalidServer": "Falsche Server-Adresse",
|
||||
"invalidServerTimeout": "Ungültiger Wert für die Server-Wartezeit",
|
||||
"serverUrl": "Server-Adresse",
|
||||
"serverTimeout": "Server-Wartezeit (in Sekunden)"
|
||||
"serverTimeout": "Server-Wartezeit (in Sekunden)",
|
||||
"disableAGC": "Automatische Mikrofonlautstärkeregelung deaktivieren"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"invalidServer": "Invalid Server URL",
|
||||
"invalidServerTimeout": "Invalid value for Server Timeout",
|
||||
"serverUrl": "Server URL",
|
||||
"serverTimeout": "Server Timeout (in seconds)"
|
||||
"serverTimeout": "Server Timeout (in seconds)",
|
||||
"disableAGC": "Disable automatic gain control"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue