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(local-recording) Enable local rec for non-moderators (#13334)

Horatiu Muresanb705c63a65ba
diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx
index 1b037bd7cd..ea685d5cfe 100644
--- a/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx
+++ b/react/features/recording/components/Recording/AbstractStartRecordingDialogContent.tsx
@@ -6,6 +6,7 @@ import { sendAnalytics } from '../../../analytics/functions';
import { IReduxState } from '../../../app/types';
import ColorSchemeRegistry from '../../../base/color-scheme/ColorSchemeRegistry';
import { _abstractMapStateToProps } from '../../../base/dialog/functions';
+import { isLocalParticipantModerator } from '../../../base/participants/functions';
import { authorizeDropbox, updateDropboxToken } from '../../../dropbox/actions';
import { isVpaasMeeting } from '../../../jaas/functions';
import { RECORDING_TYPES } from '../../constants';
@@ -27,6 +28,11 @@ export interface IProps extends WithTranslation {
*/
_hideStorageWarning: boolean;
+ /**
+ * Whether local participant is moderator.
+ */
+ _isModerator: boolean;
+
/**
* Whether local recording is available or not.
*/
@@ -334,6 +340,7 @@ export function mapStateToProps(state: IReduxState) {
..._abstractMapStateToProps(state),
isVpaas: isVpaasMeeting(state),
_hideStorageWarning: Boolean(recordingService?.hideStorageWarning),
+ _isModerator: isLocalParticipantModerator(state),
_localRecordingAvailable,
_localRecordingEnabled: !localRecording?.disable,
_localRecordingSelfEnabled: !localRecording?.disableSelfRecording,
diff --git a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx
index ab2792f673..a583bdff26 100644
--- a/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx
+++ b/react/features/recording/components/Recording/web/StartRecordingDialogContent.tsx
@@ -40,10 +40,14 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent<IP
render() {
return (
<Container className = 'recording-dialog'>
- { this._renderNoIntegrationsContent() }
- { this._renderFileSharingContent() }
- { this._renderUploadToTheCloudInfo() }
- { this._renderIntegrationsContent() }
+ { this.props._isModerator && (
+ <>
+ { this._renderNoIntegrationsContent() }
+ { this._renderFileSharingContent() }
+ { this._renderUploadToTheCloudInfo() }
+ { this._renderIntegrationsContent() }
+ </>
+ )}
{ this._renderLocalRecordingContent() }
</Container>
);
diff --git a/react/features/recording/functions.ts b/react/features/recording/functions.ts
index 5666eed5d5..509ef1cb3d 100644
--- a/react/features/recording/functions.ts
+++ b/react/features/recording/functions.ts
@@ -176,7 +176,7 @@ export function getRecordButtonProps(state: IReduxState) {
if (isModerator) {
visible = recordingEnabled ? isJwtFeatureEnabled(state, 'recording', true) : false;
} else {
- visible = false;
+ visible = navigator.product !== 'ReactNative' && localRecordingEnabled;
}
// disable the button if the livestreaming is running.