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(recording): decouple transcription from live stream and local recording visibility
damenchoebdbd6b61ce5
diff --git a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.tsindex a71d996a73..e7f9f94fa6 100644--- a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts+++ b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts@@ -5,7 +5,6 @@ import { isJwtFeatureEnabled } from '../../../base/jwt/functions';import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';import { isInBreakoutRoom } from '../../../breakout-rooms/functions';import { maybeShowPremiumFeatureDialog } from '../../../jaas/actions';-import { isRecorderTranscriptionsRunning } from '../../../transcribing/functions';import { isCloudRecordingRunning, isLiveStreamingButtonVisible, isLiveStreamingRunning } from '../../functions';import { getLiveStreaming } from './functions';@@ -137,8 +136,8 @@ export function _mapStateToProps(state: IReduxState, ownProps: IProps) {});}- // disable the button if the recording is running.- if (visible && (isCloudRecordingRunning(state) || isRecorderTranscriptionsRunning(state))) {+ // disable the button if cloud recording is running.+ if (visible && isCloudRecordingRunning(state)) {_disabled = true;_tooltip = 'dialog.liveStreamingDisabledBecauseOfActiveRecordingTooltip';}diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsxindex 310dd8cc5a..26421844c5 100644--- a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx+++ b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx@@ -13,7 +13,7 @@ import { authorizeDropbox, updateDropboxToken } from '../../../dropbox/actions';import { isVpaasMeeting } from '../../../jaas/functions';import { canAddTranscriber, isRecorderTranscriptionsRunning } from '../../../transcribing/functions';import { RECORDING_TYPES } from '../../constants';-import { hasRecordingOrTranscriptionFeature, supportsLocalRecording } from '../../functions';+import { hasRecordingOrTranscriptionFeature, isLiveStreamingRunning, supportsLocalRecording } from '../../functions';/*** The type of the React {@code Component} props of@@ -42,6 +42,11 @@ export interface IProps extends WithTranslation {*/_hideStorageWarning: boolean;+ /**+ * Whether a live stream session is currently active.+ */+ _isLiveStreamRunning: boolean;+/*** Whether the local participant is a moderator.*/@@ -500,6 +505,7 @@ export function mapStateToProps(state: IReduxState) {isVpaas: isVpaasMeeting(state),_canManageRecordingOrTranscription: canManageRecordingOrTranscription,_canStartTranscribing: canAddTranscriber(state),+ _isLiveStreamRunning: isLiveStreamingRunning(state),_hideStorageWarning: Boolean(recordingService?.hideStorageWarning),_isModerator: isLocalParticipantModerator(state),_renderRecording: isJwtFeatureEnabled(state, MEET_FEATURES.RECORDING, false),diff --git a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsxindex 7f632c3a61..17b710f650 100644--- a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx+++ b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx@@ -39,6 +39,7 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent {*/_renderSessionToggles() {const {+ _isLiveStreamRunning,_localRecordingRunning,_renderRecording,shouldRecordAudioAndVideo,@@ -48,7 +49,8 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent {// A participant who started a local recording must always be able to stop it,// even without the JWT recording feature that _renderRecording reflects.- const renderRecordingToggle = _renderRecording || _localRecordingRunning;+ // Cloud recording (Jibri) cannot run alongside an active live stream.+ const renderRecordingToggle = (!_isLiveStreamRunning && _renderRecording) || _localRecordingRunning;return (<>@@ -88,6 +90,7 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent {override render() {const {_canStartTranscribing,+ _isLiveStreamRunning,_renderRecording,_transcriptionRunning,fileRecordingsServiceEnabled,@@ -113,14 +116,18 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent {<Container className = 'recording-dialog'>{ this._renderFileSharingContent() }{ this._renderSessionToggles() }+ { /* _renderSessionToggles already covers local recording when !_renderRecording */ }+ { _renderRecording && this._renderLocalRecordingContent() }</Container>);}- // Cloud recording is only usable when a service (file recording or integration) is available;- // the JWT recording feature alone doesn't imply one. Transcription nests under the cloud- // options when it's supported, otherwise it shows standalone.- const supportsCloudRecording = _renderRecording && (fileRecordingsServiceEnabled || integrationsEnabled);+ // Cloud recording is only usable when a service (file recording or integration) is available,+ // the JWT recording feature alone doesn't imply one, and it cannot run alongside an active live+ // stream (both require Jibri). Transcription nests under the cloud options when supported,+ // otherwise it shows standalone.+ const supportsCloudRecording = _renderRecording && (fileRecordingsServiceEnabled || integrationsEnabled)+ && !_isLiveStreamRunning;const showTranscription = _canStartTranscribing && !supportsCloudRecording;return (diff --git a/react/features/recording/functions.ts b/react/features/recording/functions.tsindex 86fa1122dc..9379ae9e94 100644--- a/react/features/recording/functions.ts+++ b/react/features/recording/functions.ts@@ -269,7 +269,7 @@ export function getRecordButtonProps(state: IReduxState) {// a button can be disabled/enabled if enableFeaturesBasedOnToken// is on or if the livestreaming is running.let disabled = false;- let tooltip = isRecordingRunning(state) ? 'dialog.stopRecording' : 'dialog.startRecording';+ const tooltip = isRecordingRunning(state) ? 'dialog.stopRecording' : 'dialog.startRecording';// If the containing component provides the visible prop, that is one// above all, but if not, the button should be autonomus and decide on@@ -297,12 +297,6 @@ export function getRecordButtonProps(state: IReduxState) {visible = recordingEnabled || transcriptionEnabled;}- // disable the button if the livestreaming is running.- if (visible && isLiveStreamingRunning(state)) {- disabled = true;- tooltip = 'dialog.recordingDisabledBecauseOfActiveLiveStreamingTooltip';- }-// disable the button if we are in a breakout room.if (isInBreakoutRoomF(state)) {disabled = true;