fix(web-hid): Fully disable from config

pull/13377/head jitsi-meet_8683
Hristo Terezov 2 years ago
parent c92ce56110
commit e82a5cf150
  1. 7
      react/features/web-hid/middleware.ts

@ -1,5 +1,6 @@
import { IStore } from '../app/types';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes';
import { getWebHIDFeatureConfig } from '../base/config/functions.web';
import { SET_AUDIO_MUTED } from '../base/media/actionTypes';
import { isAudioMuted } from '../base/media/functions';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
@ -33,7 +34,11 @@ let updateDeviceListener: (e: any) => void;
* @returns {Function}
*/
MiddlewareRegistry.register((store: IStore) => next => async action => {
const { dispatch } = store;
const { dispatch, getState } = store;
if (!getWebHIDFeatureConfig(getState())) {
return next(action);
}
switch (action.type) {
case APP_WILL_MOUNT: {

Loading…
Cancel
Save