mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(dynamic-branding) support setting transcription language
It will be used as the default if specified.
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
f85d0e6469
commit
83192435e7
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ export interface IDynamicBrandingState {
|
||||
customizationFailed: boolean;
|
||||
customizationReady: boolean;
|
||||
defaultBranding: boolean;
|
||||
defaultTranscriptionLanguage?: boolean;
|
||||
didPageUrl: string;
|
||||
inviteDomain: string;
|
||||
labels: Object | null;
|
||||
|
||||
Reference in New Issue
Block a user