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
ref: add selector for checking cloud recording running status
Avram Tudor361b82a1ed0f
diff --git a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.tsindex 41476a5581..43aad82978 100644--- a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts+++ b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.ts@@ -7,7 +7,7 @@ import { isLocalParticipantModerator } from '../../../base/participants/functionimport AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';import { isInBreakoutRoom } from '../../../breakout-rooms/functions';import { maybeShowPremiumFeatureDialog } from '../../../jaas/actions';-import { getActiveSession } from '../../functions';+import { getActiveSession, isCloudRecordingRunning } from '../../functions';import { getLiveStreaming } from './functions';@@ -140,7 +140,7 @@ export function _mapStateToProps(state: IReduxState, ownProps: IProps) {}// disable the button if the recording is running.- if (visible && getActiveSession(state, JitsiRecordingConstants.mode.FILE)) {+ if (visible && isCloudRecordingRunning(state)) {_disabled = true;_tooltip = 'dialog.liveStreamingDisabledBecauseOfActiveRecordingTooltip';}diff --git a/react/features/recording/components/Recording/AbstractHighlightButton.ts b/react/features/recording/components/Recording/AbstractHighlightButton.tsindex 78adabc08e..184475f613 100644--- a/react/features/recording/components/Recording/AbstractHighlightButton.ts+++ b/react/features/recording/components/Recording/AbstractHighlightButton.ts@@ -4,14 +4,17 @@ import { WithTranslation } from 'react-i18next';import { IReduxState, IStore } from '../../../app/types';import { openDialog } from '../../../base/dialog/actions';import { MEET_FEATURES } from '../../../base/jwt/constants';-import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';import { maybeShowPremiumFeatureDialog } from '../../../jaas/actions';import { hideNotification, showNotification } from '../../../notifications/actions';import { NOTIFICATION_TIMEOUT_TYPE, NOTIFICATION_TYPE } from '../../../notifications/constants';import { iAmVisitor } from '../../../visitors/functions';import { highlightMeetingMoment } from '../../actions.any';import { PROMPT_RECORDING_NOTIFICATION_ID } from '../../constants';-import { getActiveSession, getRecordButtonProps, isHighlightMeetingMomentDisabled } from '../../functions';+import {+ getRecordButtonProps,+ isCloudRecordingRunning,+ isHighlightMeetingMomentDisabled+} from '../../functions';import { StartRecordingDialog } from './index';@@ -103,7 +106,7 @@ export default class AbstractHighlightButton<P extends IProps, S={}> extends Com* }}*/export function _abstractMapStateToProps(state: IReduxState) {- const isRecordingRunning = getActiveSession(state, JitsiRecordingConstants.mode.FILE);+ const isRecordingRunning = isCloudRecordingRunning(state);const isButtonDisabled = isHighlightMeetingMomentDisabled(state);const { webhookProxyUrl } = state['features/base/config'];const _iAmVisitor = iAmVisitor(state);diff --git a/react/features/recording/functions.ts b/react/features/recording/functions.tsindex e28a1eedf6..83a48175e1 100644--- a/react/features/recording/functions.ts+++ b/react/features/recording/functions.ts@@ -158,6 +158,16 @@ export function supportsLocalRecording() {&& navigator.product !== 'ReactNative';}+/**+ * Returns true if there is a cloud recording running.+ *+ * @param {IReduxState} state - The redux state to search in.+ * @returns {boolean}+ */+export function isCloudRecordingRunning(state: IReduxState) {+ return Boolean(getActiveSession(state, JitsiRecordingConstants.mode.FILE));+}+/*** Returns true if there is a recording session running.*@@ -168,7 +178,7 @@ export function isRecordingRunning(state: IReduxState) {const { isTranscribing } = state['features/transcribing'];return (- Boolean(getActiveSession(state, JitsiRecordingConstants.mode.FILE))+ isCloudRecordingRunning(state)|| LocalRecordingManager.isRecordingLocally()|| isTranscribing);diff --git a/react/features/screenshot-capture/functions.tsx b/react/features/screenshot-capture/functions.tsxindex ea0bead472..00cd0ce8ab 100644--- a/react/features/screenshot-capture/functions.tsx+++ b/react/features/screenshot-capture/functions.tsx@@ -1,8 +1,7 @@import { IReduxState } from '../app/types';import { IStateful } from '../base/app/types';-import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';import { toState } from '../base/redux/functions';-import { getActiveSession } from '../recording/functions';+import { isCloudRecordingRunning } from '../recording/functions';import { isScreenVideoShared } from '../screen-share/functions';import ScreenshotCaptureSummary from './ScreenshotCaptureSummary';@@ -48,7 +47,7 @@ export function isScreenshotCaptureEnabled(state: IReduxState, checkSharing?: bo}// Feature enabled only when recording is also on.- return Boolean(getActiveSession(state, JitsiRecordingConstants.mode.FILE));+ return isCloudRecordingRunning(state);}return true;