Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(web-hid): Fully disable from config

Hristo Terezove82a5cf150f1
diff --git a/react/features/web-hid/middleware.ts b/react/features/web-hid/middleware.ts
index d39e3b43df..123a9dccce 100644
--- a/react/features/web-hid/middleware.ts
+++ b/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: {