Browse Source

feat(webhid) - add webhid feature flag (#13071)

factor2
Duduman Bogdan Vlad 2 years ago
parent
commit
62b6411bb6
No account linked to committer's email address

+ 3
- 0
config.js View File

590
     // Require users to always specify a display name.
590
     // Require users to always specify a display name.
591
     // requireDisplayName: true,
591
     // requireDisplayName: true,
592
 
592
 
593
+    // Enables webhid functionality for Audio.
594
+    // enableWebHIDFeature: false,
595
+
593
     // DEPRECATED! Use 'welcomePage.disabled' instead.
596
     // DEPRECATED! Use 'welcomePage.disabled' instead.
594
     // Whether to use a welcome page or not. In case it's false a random room
597
     // Whether to use a welcome page or not. In case it's false a random room
595
     // will be joined when no room is specified.
598
     // will be joined when no room is specified.

+ 1
- 0
react/features/base/config/configType.ts View File

324
     enableSaveLogs?: boolean;
324
     enableSaveLogs?: boolean;
325
     enableTcc?: boolean;
325
     enableTcc?: boolean;
326
     enableUnifiedOnChrome?: boolean;
326
     enableUnifiedOnChrome?: boolean;
327
+    enableWebHIDFeature?: boolean;
327
     enableWelcomePage?: boolean;
328
     enableWelcomePage?: boolean;
328
     etherpad_base?: string;
329
     etherpad_base?: string;
329
     faceLandmarks?: {
330
     faceLandmarks?: {

+ 10
- 0
react/features/base/config/functions.web.ts View File

44
     return buttons;
44
     return buttons;
45
 }
45
 }
46
 
46
 
47
+/**
48
+ * Returns the configuration value of web-hid feature.
49
+ *
50
+ * @param {Object} state - The state of the app.
51
+ * @returns {boolean} True if web-hid feature should be enabled, otherwise false.
52
+ */
53
+export function getWebHIDFeatureConfig(state: IReduxState): boolean {
54
+    return state['features/base/config'].enableWebHIDFeature || false;
55
+}
56
+
47
 /**
57
 /**
48
  * Checks if the specified button is enabled.
58
  * Checks if the specified button is enabled.
49
  *
59
  *

+ 2
- 1
react/features/device-selection/functions.web.ts View File

1
 import { IStore } from '../app/types';
1
 import { IStore } from '../app/types';
2
 import { IStateful } from '../base/app/types';
2
 import { IStateful } from '../base/app/types';
3
+import { getWebHIDFeatureConfig } from '../base/config/functions.web';
3
 import {
4
 import {
4
     addPendingDeviceRequest,
5
     addPendingDeviceRequest,
5
     getAvailableDevices,
6
     getAvailableDevices,
46
     const inputDeviceChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('input');
47
     const inputDeviceChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('input');
47
     const speakerChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output');
48
     const speakerChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output');
48
     const userSelectedMic = getUserSelectedMicDeviceId(state);
49
     const userSelectedMic = getUserSelectedMicDeviceId(state);
49
-    const deviceHidSupported = isDeviceHidSupported();
50
+    const deviceHidSupported = isDeviceHidSupported() && getWebHIDFeatureConfig(state);
50
     const noiseSuppressionEnabled = isNoiseSuppressionEnabled(state);
51
     const noiseSuppressionEnabled = isNoiseSuppressionEnabled(state);
51
     const hideNoiseSuppression = isPrejoinPageVisible(state) || isDisplayedOnWelcomePage;
52
     const hideNoiseSuppression = isPrejoinPageVisible(state) || isDisplayedOnWelcomePage;
52
 
53
 

Loading…
Cancel
Save