fix(local-recording) Improvements (#11754)
Show Start rec button if local rec is enabled but fileRecordings is disabled Add warning for users to stop the recording
This commit is contained in:
parent
3f795cd1ff
commit
730d42cba1
|
@ -896,6 +896,8 @@
|
|||
"live": "LIVE",
|
||||
"localRecordingNoNotificationWarning": "The recording will not be announced to other participants. You will need to let them know that the meeting is recorded.",
|
||||
"localRecordingNoVideo": "Video is not being recorded",
|
||||
"localRecordingStartWarning": "Please make sure you stop the recording before exiting the meeting in order to save it.",
|
||||
"localRecordingStartWarningTitle": "Stop the recording to save it",
|
||||
"localRecordingVideoStop": "Stopping your video will also stop the local recording. Are you sure you want to continue?",
|
||||
"localRecordingVideoWarning": "To record your video you must have it on when starting the recording",
|
||||
"localRecordingWarning": "Make sure you select the current tab in order to use the right video and audio. The recording is currently limited to 1GB, which is around 100 minutes.",
|
||||
|
|
|
@ -405,6 +405,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
|
|||
export function mapStateToProps(state: Object) {
|
||||
const {
|
||||
transcription,
|
||||
fileRecordingsEnabled = false,
|
||||
fileRecordingsServiceEnabled = false,
|
||||
fileRecordingsServiceSharingEnabled = false,
|
||||
dropbox = {}
|
||||
|
@ -414,6 +415,7 @@ export function mapStateToProps(state: Object) {
|
|||
_appKey: dropbox.appKey,
|
||||
_autoCaptionOnRecord: transcription?.autoCaptionOnRecord ?? false,
|
||||
_conference: state['features/base/conference'].conference,
|
||||
_fileRecordingsEnabled: fileRecordingsEnabled,
|
||||
_fileRecordingsServiceEnabled: fileRecordingsServiceEnabled,
|
||||
_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,
|
||||
_isDropboxEnabled: isDropboxEnabled(state),
|
||||
|
|
|
@ -64,6 +64,11 @@ type Props = {
|
|||
*/
|
||||
dispatch: Function,
|
||||
|
||||
/**
|
||||
* Whether the file recording is enabled.
|
||||
*/
|
||||
fileRecordingsEnabled: boolean,
|
||||
|
||||
/**
|
||||
* Whether to show file recordings service, even if integrations
|
||||
* are enabled.
|
||||
|
@ -211,9 +216,14 @@ class StartRecordingDialogContent extends Component<Props> {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
_shouldRenderFileSharingContent() {
|
||||
const { fileRecordingsServiceSharingEnabled, isVpaas, selectedRecordingService } = this.props;
|
||||
const {
|
||||
fileRecordingsServiceSharingEnabled,
|
||||
isVpaas,
|
||||
selectedRecordingService,
|
||||
fileRecordingsEnabled
|
||||
} = this.props;
|
||||
|
||||
if (!fileRecordingsServiceSharingEnabled
|
||||
if (!(fileRecordingsServiceSharingEnabled && fileRecordingsEnabled)
|
||||
|| isVpaas
|
||||
|| selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE) {
|
||||
return false;
|
||||
|
@ -319,6 +329,9 @@ 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)) {
|
||||
return false;
|
||||
|
@ -441,7 +454,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
|||
);
|
||||
}
|
||||
|
||||
if (this.props.fileRecordingsServiceEnabled) {
|
||||
if (this.props.fileRecordingsServiceEnabled && this.props.fileRecordingsEnabled) {
|
||||
switchContent = (
|
||||
<Switch
|
||||
className = 'recording-switch'
|
||||
|
|
|
@ -62,6 +62,7 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {
|
|||
userName
|
||||
} = this.state;
|
||||
const {
|
||||
_fileRecordingsEnabled,
|
||||
_fileRecordingsServiceEnabled,
|
||||
_fileRecordingsServiceSharingEnabled
|
||||
} = this.props;
|
||||
|
@ -74,6 +75,7 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {
|
|||
titleKey = 'dialog.startRecording'
|
||||
width = 'small'>
|
||||
<StartRecordingDialogContent
|
||||
fileRecordingsEnabled = { _fileRecordingsEnabled }
|
||||
fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }
|
||||
fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }
|
||||
integrationsEnabled = { this._areIntegrationsEnabled() }
|
||||
|
|
|
@ -151,11 +151,17 @@ export function getRecordButtonProps(state: Object): ?string {
|
|||
const isModerator = isLocalParticipantModerator(state);
|
||||
const {
|
||||
enableFeaturesBasedOnToken,
|
||||
fileRecordingsEnabled
|
||||
fileRecordingsEnabled,
|
||||
localRecording
|
||||
} = state['features/base/config'];
|
||||
const { features = {} } = getLocalParticipant(state);
|
||||
let localRecordingEnabled = !localRecording?.disable;
|
||||
|
||||
visible = isModerator && fileRecordingsEnabled;
|
||||
if (navigator.product === 'ReactNative') {
|
||||
localRecordingEnabled = false;
|
||||
}
|
||||
|
||||
visible = isModerator && (fileRecordingsEnabled || localRecordingEnabled);
|
||||
|
||||
if (enableFeaturesBasedOnToken) {
|
||||
visible = visible && String(features.recording) === 'true';
|
||||
|
|
|
@ -147,6 +147,10 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
|||
dispatch(playSound(RECORDING_ON_SOUND_ID));
|
||||
}
|
||||
dispatch(showNotification(props, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));
|
||||
dispatch(showNotification({
|
||||
titleKey: 'recording.localRecordingStartWarningTitle',
|
||||
descriptionKey: 'recording.localRecordingStartWarning'
|
||||
}, NOTIFICATION_TIMEOUT_TYPE.STICKY));
|
||||
dispatch(updateLocalRecordingStatus(true, onlySelf));
|
||||
sendAnalytics(createRecordingEvent('started', `local${onlySelf ? '.self' : ''}`));
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in New Issue