diff --git a/react/features/base/conference/functions.ts b/react/features/base/conference/functions.ts index d702123f9721..f4757f2b3ab6 100644 --- a/react/features/base/conference/functions.ts +++ b/react/features/base/conference/functions.ts @@ -208,6 +208,7 @@ export function getConferenceOptions(stateful: IStateful) { const config = state['features/base/config']; const { locationURL } = state['features/base/connection']; + const { defaultTranscriptionLanguage } = state['features/dynamic-branding']; const { tenant } = state['features/base/jwt']; const { email, name: nick } = getLocalParticipant(state) ?? {}; const options: any = { ...config }; @@ -229,7 +230,8 @@ export function getConferenceOptions(stateful: IStateful) { } options.applicationName = getName(); - options.transcriptionLanguage = determineTranscriptionLanguage(options); + options.transcriptionLanguage + = defaultTranscriptionLanguage ?? determineTranscriptionLanguage(options); // Disable analytics, if requested. if (options.disableThirdPartyRequests) { diff --git a/react/features/base/i18n/middleware.ts b/react/features/base/i18n/middleware.ts index 1b06e753fd19..6060c48a81a1 100644 --- a/react/features/base/i18n/middleware.ts +++ b/react/features/base/i18n/middleware.ts @@ -1,4 +1,5 @@ import { SET_DYNAMIC_BRANDING_DATA } from '../../dynamic-branding/actionTypes'; +import { getConferenceState } from '../conference/functions'; import MiddlewareRegistry from '../redux/MiddlewareRegistry'; import { I18NEXT_INITIALIZED, LANGUAGE_CHANGED } from './actionTypes'; @@ -28,6 +29,18 @@ MiddlewareRegistry.register(store => next => action => { logger.log('Error setting dynamic language bundle', err); }); } + + // Update transcription language, if applicable. + if (action.type === SET_DYNAMIC_BRANDING_DATA) { + const { defaultTranscriptionLanguage } = action.value; + + if (typeof defaultTranscriptionLanguage !== 'undefined') { + const { conference } = getConferenceState(store.getState()); + + conference?.setTranscriptionLanguage(defaultTranscriptionLanguage); + } + } + break; } } diff --git a/react/features/dynamic-branding/reducer.ts b/react/features/dynamic-branding/reducer.ts index 89c849668078..39bbf9c859ce 100644 --- a/react/features/dynamic-branding/reducer.ts +++ b/react/features/dynamic-branding/reducer.ts @@ -150,6 +150,7 @@ export interface IDynamicBrandingState { customizationFailed: boolean; customizationReady: boolean; defaultBranding: boolean; + defaultTranscriptionLanguage?: boolean; didPageUrl: string; inviteDomain: string; labels: Object | null;