Parcourir la source

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

factor2
Duduman Bogdan Vlad il y a 2 ans
Parent
révision
62b6411bb6
Aucun compte lié à l'adresse e-mail de l'auteur

+ 3
- 0
config.js Voir le fichier

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

+ 1
- 0
react/features/base/config/configType.ts Voir le fichier

@@ -324,6 +324,7 @@ export interface IConfig {
324 324
     enableSaveLogs?: boolean;
325 325
     enableTcc?: boolean;
326 326
     enableUnifiedOnChrome?: boolean;
327
+    enableWebHIDFeature?: boolean;
327 328
     enableWelcomePage?: boolean;
328 329
     etherpad_base?: string;
329 330
     faceLandmarks?: {

+ 10
- 0
react/features/base/config/functions.web.ts Voir le fichier

@@ -44,6 +44,16 @@ export function getToolbarButtons(state: IReduxState): Array<string> {
44 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 58
  * Checks if the specified button is enabled.
49 59
  *

+ 2
- 1
react/features/device-selection/functions.web.ts Voir le fichier

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

Chargement…
Annuler
Enregistrer