From 576fd0d3434e763fbbeec2ad9599b2813268533f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Fri, 1 Oct 2021 10:23:46 -0500 Subject: [PATCH] fix: Skips setting language for transcriptions if not enabled. --- react/features/transcribing/functions.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/react/features/transcribing/functions.js b/react/features/transcribing/functions.js index fdbb0e500..e10b29702 100644 --- a/react/features/transcribing/functions.js +++ b/react/features/transcribing/functions.js @@ -15,7 +15,12 @@ const DEFAULT_TRANSCRIBER_LANG = 'en-US'; * @returns {string} */ export function determineTranscriptionLanguage(config: Object) { - const { preferredTranscribeLanguage, transcribeWithAppLanguage = true } = config; + const { preferredTranscribeLanguage, transcribeWithAppLanguage = true, transcribingEnabled } = config; + + // if transcriptions are not enabled nothing to determine + if (!transcribingEnabled) { + return undefined; + } // Depending on the config either use the language that the app automatically detected or the hardcoded // config BCP47 value.