Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(webhid) - add webhid feature flag (#13071)
Duduman Bogdan Vlad62b6411bb670
diff --git a/config.js b/config.jsindex 6b4a36809e..9ac56da9bb 100644--- a/config.js+++ b/config.js@@ -590,6 +590,9 @@ var config = {// Require users to always specify a display name.// requireDisplayName: true,+ // Enables webhid functionality for Audio.+ // enableWebHIDFeature: false,+// DEPRECATED! Use 'welcomePage.disabled' instead.// Whether to use a welcome page or not. In case it's false a random room// will be joined when no room is specified.diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.tsindex 06fb311a07..1ed5ea4154 100644--- a/react/features/base/config/configType.ts+++ b/react/features/base/config/configType.ts@@ -324,6 +324,7 @@ export interface IConfig {enableSaveLogs?: boolean;enableTcc?: boolean;enableUnifiedOnChrome?: boolean;+ enableWebHIDFeature?: boolean;enableWelcomePage?: boolean;etherpad_base?: string;faceLandmarks?: {diff --git a/react/features/base/config/functions.web.ts b/react/features/base/config/functions.web.tsindex a3d72f5057..c7d9a7a1a8 100644--- a/react/features/base/config/functions.web.ts+++ b/react/features/base/config/functions.web.ts@@ -44,6 +44,16 @@ export function getToolbarButtons(state: IReduxState): Array<string> {return buttons;}+/**+ * Returns the configuration value of web-hid feature.+ *+ * @param {Object} state - The state of the app.+ * @returns {boolean} True if web-hid feature should be enabled, otherwise false.+ */+export function getWebHIDFeatureConfig(state: IReduxState): boolean {+ return state['features/base/config'].enableWebHIDFeature || false;+}+/*** Checks if the specified button is enabled.*diff --git a/react/features/device-selection/functions.web.ts b/react/features/device-selection/functions.web.tsindex 6c51729d20..f86efb8605 100644--- a/react/features/device-selection/functions.web.ts+++ b/react/features/device-selection/functions.web.ts@@ -1,5 +1,6 @@import { IStore } from '../app/types';import { IStateful } from '../base/app/types';+import { getWebHIDFeatureConfig } from '../base/config/functions.web';import {addPendingDeviceRequest,getAvailableDevices,@@ -46,7 +47,7 @@ export function getAudioDeviceSelectionDialogProps(stateful: IStateful, isDisplaconst inputDeviceChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('input');const speakerChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output');const userSelectedMic = getUserSelectedMicDeviceId(state);- const deviceHidSupported = isDeviceHidSupported();+ const deviceHidSupported = isDeviceHidSupported() && getWebHIDFeatureConfig(state);const noiseSuppressionEnabled = isNoiseSuppressionEnabled(state);const hideNoiseSuppression = isPrejoinPageVisible(state) || isDisplayedOnWelcomePage;