feat(recording) Add config to hide storage warning (#11761)
This commit is contained in:
parent
ee266160f9
commit
c4f39e9c34
30
config.js
30
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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 = (
|
||||
<Switch
|
||||
className = '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')
|
||||
|
|
|
@ -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() }
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue