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
fix(audio-translation): hide the UI when the component is not deployed (#17834)
Jaya Allamsettyc0ecbe3c9171
diff --git a/package-lock.json b/package-lock.jsonindex 573b09e705..ff084666b5 100644--- a/package-lock.json+++ b/package-lock.json@@ -70,7 +70,7 @@"js-md5": "0.6.1","js-sha512": "0.8.0","jwt-decode": "2.2.0",- "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2208.0.0+c0c591e0/lib-jitsi-meet.tgz",+ "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2209.0.0+98a6b72f/lib-jitsi-meet.tgz","lodash-es": "4.18.1","null-loader": "4.0.1","optional-require": "1.0.3",@@ -14412,8 +14412,8 @@},"node_modules/lib-jitsi-meet": {"version": "0.0.0",- "resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2208.0.0+c0c591e0/lib-jitsi-meet.tgz",- "integrity": "sha512-kqtP6aLvNy/7/3Q7I5cbKlWSFDE7BgKaKvHW8QU4tgU06CcKO/lZQdfRGTt+ESXQNgPyEPA9Xk/wMrRaN8WSBQ==",+ "resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2209.0.0+98a6b72f/lib-jitsi-meet.tgz",+ "integrity": "sha512-HbzMmI4GDcb+JXo/mIYslcqAd6J6BlPu65pHB9EcXGZsG+02o+cfFwLFLHkvXGk3hoFX3ZKWUp5V7qli2nheUg==","dependencies": {"@jitsi/js-utils": "6.3.2","@jitsi/logger": "2.1.1",@@ -31720,8 +31720,8 @@}},"lib-jitsi-meet": {- "version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2208.0.0+c0c591e0/lib-jitsi-meet.tgz",- "integrity": "sha512-kqtP6aLvNy/7/3Q7I5cbKlWSFDE7BgKaKvHW8QU4tgU06CcKO/lZQdfRGTt+ESXQNgPyEPA9Xk/wMrRaN8WSBQ==",+ "version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2209.0.0+98a6b72f/lib-jitsi-meet.tgz",+ "integrity": "sha512-HbzMmI4GDcb+JXo/mIYslcqAd6J6BlPu65pHB9EcXGZsG+02o+cfFwLFLHkvXGk3hoFX3ZKWUp5V7qli2nheUg==","requires": {"@jitsi/js-utils": "6.3.2","@jitsi/logger": "2.1.1",diff --git a/package.json b/package.jsonindex 6de5325498..c110dd5e28 100644--- a/package.json+++ b/package.json@@ -76,7 +76,7 @@"js-md5": "0.6.1","js-sha512": "0.8.0","jwt-decode": "2.2.0",- "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2208.0.0+c0c591e0/lib-jitsi-meet.tgz",+ "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v2209.0.0+98a6b72f/lib-jitsi-meet.tgz","lodash-es": "4.18.1","null-loader": "4.0.1","optional-require": "1.0.3",diff --git a/react/features/audio-translation/functions.ts b/react/features/audio-translation/functions.tsindex cc1290476e..9409b38d7e 100644--- a/react/features/audio-translation/functions.ts+++ b/react/features/audio-translation/functions.ts@@ -135,8 +135,8 @@ export function canManageAudioTranslation(state: IReduxState): boolean {}/**- * Whether the audio-translation UI should be available to the local user: the feature must be deployed- * ({@code config.audioTranslation.enabled}) and either the user can manage it or it is enabled for the room.+ * Whether the audio-translation UI should be available to the local user: the feature must be enabled in config+ * and supported by the deployment, and either the user can manage it or it is enabled for the room.** @param {IReduxState} state - The redux state.* @returns {boolean}@@ -151,6 +151,12 @@ export function isAudioTranslationAvailable(state: IReduxState): boolean {return false;}+ // The component is advertised over service discovery, so an enabled config does not mean it is deployed.+ // Only an explicit false hides it, so an older lib-jitsi-meet without the check stays unaffected.+ if (state['features/base/conference'].conference?.isAudioTranslationSupported?.() === false) {+ return false;+ }+// Per-room availability via RoomMetadata; only an explicit false hides it.if (state['features/base/conference'].metadata?.audioTranslationAvailable === false) {return false;diff --git a/react/features/base/conference/reducer.ts b/react/features/base/conference/reducer.tsindex 8445e9de4e..c877cd9285 100644--- a/react/features/base/conference/reducer.ts+++ b/react/features/base/conference/reducer.ts@@ -137,6 +137,7 @@ export interface IJitsiConference {getTranscriptionStatus: Function;grantOwner: Function;isAVModerationSupported: Function;+ isAudioTranslationSupported?: () => boolean;isE2EEEnabled: Function;isE2EESupported: Function;isEndConferenceSupported: Function;