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
feat(recording) Add config to hide storage warning (#11761)
Robert Pintiliic4f39e9c3488
diff --git a/config.js b/config.jsindex 51d088522c..c0e1c9a586 100644--- a/config.js+++ b/config.js@@ -271,8 +271,9 @@ var config = {// Recording- // Whether to enable file recording or not.+ // DEPRECATED. Use recordingService.enabled instead.// fileRecordingsEnabled: false,+// Enable the dropbox integration.// dropbox: {// appKey: '<APP_KEY>' // Specify your app key here.@@ -282,14 +283,27 @@ var config = {// redirectURI:// 'https://jitsi-meet.example.com/subfolder/static/oauth.html'// },- // When integrations like dropbox are enabled only that will be shown,- // by enabling fileRecordingsServiceEnabled, we show both the integrations- // and the generic recording service (its configuration and storage type- // depends on jibri configuration)++ // recordingService: {+ // // When integrations like dropbox are enabled only that will be shown,+ // // by enabling fileRecordingsServiceEnabled, we show both the integrations+ // // and the generic recording service (its configuration and storage type+ // // depends on jibri configuration)+ // enabled: false,++ // // Whether to show the possibility to share file recording with other people+ // // (e.g. meeting participants), based on the actual implementation+ // // on the backend.+ // sharingEnabled: false,++ // // Hide the warning that says we only store the recording for 24 hours.+ // hideStorageWarning: false+ // },++ // DEPRECATED. Use recordingService.enabled instead.// fileRecordingsServiceEnabled: false,- // Whether to show the possibility to share file recording with other people- // (e.g. meeting participants), based on the actual implementation- // on the backend.++ // DEPRECATED. Use recordingService.sharingEnabled instead.// fileRecordingsServiceSharingEnabled: false,// Whether to enable live streaming or not.diff --git a/react/features/base/config/reducer.js b/react/features/base/config/reducer.jsindex 815343591f..33603f6dc1 100644--- a/react/features/base/config/reducer.js+++ b/react/features/base/config/reducer.js@@ -397,6 +397,20 @@ function _translateLegacyConfig(oldValue: Object) {};}+ newValue.recordingService = newValue.recordingService || {};+ if (oldValue.fileRecordingsServiceEnabled !== undefined) {+ newValue.recordingService = {+ ...newValue.recordingService,+ enabled: oldValue.fileRecordingsServiceEnabled+ };+ }+ if (oldValue.fileRecordingsServiceSharingEnabled !== undefined) {+ newValue.recordingService = {+ ...newValue.recordingService,+ sharingEnabled: oldValue.fileRecordingsServiceSharingEnabled+ };+ }+return newValue;}diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialog.js b/react/features/recording/components/Recording/AbstractStartRecordingDialog.jsindex 8006e9d32c..6527ff4cf1 100644--- a/react/features/recording/components/Recording/AbstractStartRecordingDialog.js+++ b/react/features/recording/components/Recording/AbstractStartRecordingDialog.js@@ -405,9 +405,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {export function mapStateToProps(state: Object) {const {transcription,- fileRecordingsEnabled = false,- fileRecordingsServiceEnabled = false,- fileRecordingsServiceSharingEnabled = false,+ recordingService,dropbox = {}} = state['features/base/config'];@@ -415,9 +413,8 @@ export function mapStateToProps(state: Object) {_appKey: dropbox.appKey,_autoCaptionOnRecord: transcription?.autoCaptionOnRecord ?? false,_conference: state['features/base/conference'].conference,- _fileRecordingsEnabled: fileRecordingsEnabled,- _fileRecordingsServiceEnabled: fileRecordingsServiceEnabled,- _fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,+ _fileRecordingsServiceEnabled: recordingService?.enabled ?? false,+ _fileRecordingsServiceSharingEnabled: recordingService?.sharingEnabled ?? false,_isDropboxEnabled: isDropboxEnabled(state),_rToken: state['features/dropbox'].rToken,_tokenExpireDate: state['features/dropbox'].expireDate,diff --git a/react/features/recording/components/Recording/StartRecordingDialogContent.js b/react/features/recording/components/Recording/StartRecordingDialogContent.jsindex 929f676a17..b8e18183db 100644--- a/react/features/recording/components/Recording/StartRecordingDialogContent.js+++ b/react/features/recording/components/Recording/StartRecordingDialogContent.js@@ -44,6 +44,11 @@ type Props = {*/_dialogStyles: StyleType,+ /**+ * Whether to hide the storage warning or not.+ */+ _hideStorageWarning: boolean,+/*** Whether local recording is enabled or not.*/@@ -64,11 +69,6 @@ type Props = {*/dispatch: Function,- /**- * Whether the file recording is enabled.- */- fileRecordingsEnabled: boolean,-/*** Whether to show file recordings service, even if integrations* are enabled.@@ -217,13 +217,14 @@ class StartRecordingDialogContent extends Component<Props> {*/_shouldRenderFileSharingContent() {const {+ fileRecordingsServiceEnabled,fileRecordingsServiceSharingEnabled,isVpaas,- selectedRecordingService,- fileRecordingsEnabled+ selectedRecordingService} = this.props;- if (!(fileRecordingsServiceSharingEnabled && fileRecordingsEnabled)+ if (!fileRecordingsServiceEnabled+ || !fileRecordingsServiceSharingEnabled|| isVpaas|| selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE) {return false;@@ -290,13 +291,14 @@ class StartRecordingDialogContent extends Component<Props> {_renderUploadToTheCloudInfo() {const {_dialogStyles,+ _hideStorageWarning,_styles: styles,isVpaas,selectedRecordingService,t} = this.props;- if (!(isVpaas && selectedRecordingService === RECORDING_TYPES.JITSI_REC_SERVICE)) {+ if (!(isVpaas && selectedRecordingService === RECORDING_TYPES.JITSI_REC_SERVICE) || _hideStorageWarning) {return null;}@@ -328,12 +330,8 @@ class StartRecordingDialogContent extends Component<Props> {*/_shouldRenderNoIntegrationsContent() {// show the non integrations part only if fileRecordingsServiceEnabled- // is enabled or when there are no integrations enabled- if (!this.props.fileRecordingsEnabled) {- return false;- }- if (!(this.props.fileRecordingsServiceEnabled- || !this.props.integrationsEnabled)) {+ // is enabled+ if (!this.props.fileRecordingsServiceEnabled) {return false;}@@ -454,7 +452,7 @@ class StartRecordingDialogContent extends Component<Props> {);}- if (this.props.fileRecordingsServiceEnabled && this.props.fileRecordingsEnabled) {+ if (this.props.fileRecordingsServiceEnabled) {switchContent = (<SwitchclassName = 'recording-switch'@@ -761,6 +759,7 @@ function _mapStateToProps(state) {return {..._abstractMapStateToProps(state),isVpaas: isVpaasMeeting(state),+ _hideStorageWarning: state['features/base/config'].recording?.hideStorageWarning,_localRecordingEnabled: !state['features/base/config'].localRecording?.disable,_localRecordingNoNotification: !state['features/base/config'].localRecording?.notifyAllParticipants,_styles: ColorSchemeRegistry.get(state, 'StartRecordingDialogContent')diff --git a/react/features/recording/components/Recording/web/StartRecordingDialog.js b/react/features/recording/components/Recording/web/StartRecordingDialog.jsindex 5f990ccd68..2f91354871 100644--- a/react/features/recording/components/Recording/web/StartRecordingDialog.js+++ b/react/features/recording/components/Recording/web/StartRecordingDialog.js@@ -62,7 +62,6 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {userName} = this.state;const {- _fileRecordingsEnabled,_fileRecordingsServiceEnabled,_fileRecordingsServiceSharingEnabled} = this.props;@@ -75,7 +74,6 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {titleKey = 'dialog.startRecording'width = 'small'><StartRecordingDialogContent- fileRecordingsEnabled = { _fileRecordingsEnabled }fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }integrationsEnabled = { this._areIntegrationsEnabled() }diff --git a/react/features/recording/functions.js b/react/features/recording/functions.jsindex 423ebb2889..17d16ddeb3 100644--- a/react/features/recording/functions.js+++ b/react/features/recording/functions.js@@ -151,7 +151,7 @@ export function getRecordButtonProps(state: Object): ?string {const isModerator = isLocalParticipantModerator(state);const {enableFeaturesBasedOnToken,- fileRecordingsEnabled,+ recordingService,localRecording} = state['features/base/config'];const { features = {} } = getLocalParticipant(state);@@ -161,7 +161,9 @@ export function getRecordButtonProps(state: Object): ?string {localRecordingEnabled = false;}- visible = isModerator && (fileRecordingsEnabled || localRecordingEnabled);+ const dropboxEnabled = isDropboxEnabled(state);++ visible = isModerator && (recordingService?.enabled || localRecordingEnabled || dropboxEnabled);if (enableFeaturesBasedOnToken) {visible = visible && String(features.recording) === 'true';