Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(recording): Fixes inviting jigasi when backend recording is enabled.

damencho6c78ec90991e
diff --git a/modules/API/API.js b/modules/API/API.js
index 108b610467..a82cd49ad6 100755
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -110,7 +110,7 @@ import { getParticipantsPaneOpen } from '../../react/features/participants-pane/
import { hidePiP, showPiP } from '../../react/features/pip/actions';
import { startLocalVideoRecording, stopLocalVideoRecording } from '../../react/features/recording/actions.any';
import { grantRecordingConsent, grantRecordingConsentAndUnmute } from '../../react/features/recording/actions.web';
-import { RECORDING_METADATA_ID, RECORDING_TYPES } from '../../react/features/recording/constants';
+import { RECORDING_TYPES } from '../../react/features/recording/constants';
import { getActiveSession, supportsLocalRecording } from '../../react/features/recording/functions';
import { startAudioScreenShareFlow, startScreenShareFlow } from '../../react/features/screen-share/actions';
import { isScreenAudioSupported } from '../../react/features/screen-share/functions';
@@ -780,9 +780,6 @@ function initCommands() {
if (transcription) {
APP.store.dispatch(setRequestingSubtitles(true, false, null, true));
- conference.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
- isTranscribingEnabled: true
- });
}
},
@@ -804,10 +801,7 @@ function initCommands() {
}
if (transcription) {
- APP.store.dispatch(setRequestingSubtitles(false, false, null));
- conference.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
- isTranscribingEnabled: false
- });
+ APP.store.dispatch(setRequestingSubtitles(false, false, null, true));
}
if (mode === 'local') {
diff --git a/react/features/mobile/external-api/middleware.ts b/react/features/mobile/external-api/middleware.ts
index 31b8390016..c3d8052ea4 100644
--- a/react/features/mobile/external-api/middleware.ts
+++ b/react/features/mobile/external-api/middleware.ts
@@ -58,7 +58,7 @@ import { isEnabled as isDropboxEnabled } from '../../dropbox/functions.native';
import { hideNotification, showNotification } from '../../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE, NOTIFICATION_TYPE } from '../../notifications/constants';
import { RECORDING_SESSION_UPDATED } from '../../recording/actionTypes';
-import { RECORDING_METADATA_ID, RECORDING_TYPES } from '../../recording/constants';
+import { RECORDING_TYPES } from '../../recording/constants';
import { getActiveSession } from '../../recording/functions';
import { setRequestingSubtitles } from '../../subtitles/actions.any';
import { CUSTOM_BUTTON_PRESSED } from '../../toolbox/actionTypes';
@@ -589,9 +589,6 @@ function _registerForNativeEvents(store: IStore) {
if (transcription) {
store.dispatch(setRequestingSubtitles(true, false, null, true));
- conference.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
- isTranscribingEnabled: true
- });
}
});
@@ -606,10 +603,7 @@ function _registerForNativeEvents(store: IStore) {
}
if (transcription) {
- store.dispatch(setRequestingSubtitles(false, false, null));
- conference.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
- isTranscribingEnabled: false
- });
+ store.dispatch(setRequestingSubtitles(false, false, null, true));
}
if (![ JitsiRecordingConstants.mode.FILE, JitsiRecordingConstants.mode.STREAM ].includes(mode)) {
diff --git a/react/features/recording/actions.any.ts b/react/features/recording/actions.any.ts
index 43010e12c4..a48a1029e8 100644
--- a/react/features/recording/actions.any.ts
+++ b/react/features/recording/actions.any.ts
@@ -30,10 +30,7 @@ import {
START_LOCAL_RECORDING,
STOP_LOCAL_RECORDING
} from './actionTypes';
-import {
- RECORDING_METADATA_ID,
- START_RECORDING_NOTIFICATION_ID
-} from './constants';
+import { START_RECORDING_NOTIFICATION_ID } from './constants';
import {
getRecordButtonProps,
getRecordingLink,
@@ -462,9 +459,6 @@ export function showStartRecordingNotificationWithCallback(openRecordingDialog:
});
if (autoTranscribeOnRecord) {
- conference?.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
- isTranscribingEnabled: true
- });
dispatch(setRequestingSubtitles(true, false, null, true));
}
} else {
diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialog.ts b/react/features/recording/components/Recording/AbstractStartRecordingDialog.ts
index c99f873579..cc20b924f7 100644
--- a/react/features/recording/components/Recording/AbstractStartRecordingDialog.ts
+++ b/react/features/recording/components/Recording/AbstractStartRecordingDialog.ts
@@ -416,12 +416,12 @@ class AbstractStartRecordingDialog extends Component<IProps, IState> {
if (this.state.selectedRecordingService === RECORDING_TYPES.JITSI_REC_SERVICE
&& this.state.shouldRecordTranscription) {
dispatch(setRequestingSubtitles(true, _displaySubtitles, _subtitlesLanguage, true));
+ } else {
+ _conference?.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
+ isTranscribingEnabled: this.state.shouldRecordTranscription
+ });
}
- _conference?.getMetadataHandler().setMetadata(RECORDING_METADATA_ID, {
- isTranscribingEnabled: this.state.shouldRecordTranscription
- });
-
return true;
}
diff --git a/react/features/subtitles/middleware.ts b/react/features/subtitles/middleware.ts
index 7380739bf9..9725c797e6 100644
--- a/react/features/subtitles/middleware.ts
+++ b/react/features/subtitles/middleware.ts
@@ -8,6 +8,7 @@ import JitsiMeetJS from '../base/lib-jitsi-meet';
import { TRANSCRIBER_ID } from '../base/participants/constants';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { showErrorNotification } from '../notifications/actions';
+import { RECORDING_METADATA_ID } from '../recording/constants';
import { TRANSCRIBER_JOINED } from '../transcribing/actionTypes';
import {
@@ -359,10 +360,10 @@ function _requestingSubtitlesChange(
P_NAME_REQUESTING_TRANSCRIPTION,
enabled);
- if (enabled && conference?.getTranscriptionStatus() === JitsiMeetJS.constants.transcriptionStatus.OFF) {
- const featureAllowed = isJwtFeatureEnabled(getState(), MEET_FEATURES.TRANSCRIPTION, false);
+ if (enabled && conference?.getTranscriptionStatus() === JitsiMeetJS.constants.transcriptionStatus.OFF
+ && isJwtFeatureEnabled(getState(), MEET_FEATURES.TRANSCRIPTION, false)) {
- if (featureAllowed && !backendRecordingOn) {
+ if (!conference?.getMetadataHandler()?.getMetadata()?.asyncTranscription) {
conference?.dial(TRANSCRIBER_DIAL_NUMBER)
.catch((e: any) => {
logger.error('Error dialing', e);
@@ -376,6 +377,12 @@ function _requestingSubtitlesChange(
dispatch(setSubtitlesError(true));
});
}
+
+ if (backendRecordingOn) {
+ conference?.getMetadataHandler()?.setMetadata(RECORDING_METADATA_ID, {
+ isTranscribingEnabled: true
+ });
+ }
}
if (enabled && language) {
@@ -383,6 +390,13 @@ function _requestingSubtitlesChange(
P_NAME_TRANSLATION_LANGUAGE,
language.replace('translation-languages:', ''));
}
+
+ if (!enabled && backendRecordingOn
+ && conference?.getMetadataHandler()?.getMetadata()[RECORDING_METADATA_ID]?.isTranscribingEnabled) {
+ conference?.getMetadataHandler()?.setMetadata(RECORDING_METADATA_ID, {
+ isTranscribingEnabled: false
+ });
+ }
}
/**