diff --git a/config.js b/config.js index 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: '' // 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.js index 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.js index 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 { 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.js index 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 { */ _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 { _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 { */ _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 { ); } - if (this.props.fileRecordingsServiceEnabled && this.props.fileRecordingsEnabled) { + if (this.props.fileRecordingsServiceEnabled) { switchContent = (