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",
|
"live": "LIVE",
|
||||||
"localRecordingNoNotificationWarning": "The recording will not be announced to other participants. You will need to let them know that the meeting is recorded.",
|
"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",
|
"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?",
|
"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",
|
"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.",
|
"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) {
|
export function mapStateToProps(state: Object) {
|
||||||
const {
|
const {
|
||||||
transcription,
|
transcription,
|
||||||
|
fileRecordingsEnabled = false,
|
||||||
fileRecordingsServiceEnabled = false,
|
fileRecordingsServiceEnabled = false,
|
||||||
fileRecordingsServiceSharingEnabled = false,
|
fileRecordingsServiceSharingEnabled = false,
|
||||||
dropbox = {}
|
dropbox = {}
|
||||||
|
@ -414,6 +415,7 @@ export function mapStateToProps(state: Object) {
|
||||||
_appKey: dropbox.appKey,
|
_appKey: dropbox.appKey,
|
||||||
_autoCaptionOnRecord: transcription?.autoCaptionOnRecord ?? false,
|
_autoCaptionOnRecord: transcription?.autoCaptionOnRecord ?? false,
|
||||||
_conference: state['features/base/conference'].conference,
|
_conference: state['features/base/conference'].conference,
|
||||||
|
_fileRecordingsEnabled: fileRecordingsEnabled,
|
||||||
_fileRecordingsServiceEnabled: fileRecordingsServiceEnabled,
|
_fileRecordingsServiceEnabled: fileRecordingsServiceEnabled,
|
||||||
_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,
|
_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,
|
||||||
_isDropboxEnabled: isDropboxEnabled(state),
|
_isDropboxEnabled: isDropboxEnabled(state),
|
||||||
|
|
|
@ -64,6 +64,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
dispatch: Function,
|
dispatch: Function,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the file recording is enabled.
|
||||||
|
*/
|
||||||
|
fileRecordingsEnabled: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to show file recordings service, even if integrations
|
* Whether to show file recordings service, even if integrations
|
||||||
* are enabled.
|
* are enabled.
|
||||||
|
@ -211,9 +216,14 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
_shouldRenderFileSharingContent() {
|
_shouldRenderFileSharingContent() {
|
||||||
const { fileRecordingsServiceSharingEnabled, isVpaas, selectedRecordingService } = this.props;
|
const {
|
||||||
|
fileRecordingsServiceSharingEnabled,
|
||||||
|
isVpaas,
|
||||||
|
selectedRecordingService,
|
||||||
|
fileRecordingsEnabled
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
if (!fileRecordingsServiceSharingEnabled
|
if (!(fileRecordingsServiceSharingEnabled && fileRecordingsEnabled)
|
||||||
|| isVpaas
|
|| isVpaas
|
||||||
|| selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE) {
|
|| selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -319,6 +329,9 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
_shouldRenderNoIntegrationsContent() {
|
_shouldRenderNoIntegrationsContent() {
|
||||||
// show the non integrations part only if fileRecordingsServiceEnabled
|
// show the non integrations part only if fileRecordingsServiceEnabled
|
||||||
// is enabled or when there are no integrations enabled
|
// is enabled or when there are no integrations enabled
|
||||||
|
if (!this.props.fileRecordingsEnabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!(this.props.fileRecordingsServiceEnabled
|
if (!(this.props.fileRecordingsServiceEnabled
|
||||||
|| !this.props.integrationsEnabled)) {
|
|| !this.props.integrationsEnabled)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -441,7 +454,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.fileRecordingsServiceEnabled) {
|
if (this.props.fileRecordingsServiceEnabled && this.props.fileRecordingsEnabled) {
|
||||||
switchContent = (
|
switchContent = (
|
||||||
<Switch
|
<Switch
|
||||||
className = 'recording-switch'
|
className = 'recording-switch'
|
||||||
|
|
|
@ -62,6 +62,7 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {
|
||||||
userName
|
userName
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const {
|
const {
|
||||||
|
_fileRecordingsEnabled,
|
||||||
_fileRecordingsServiceEnabled,
|
_fileRecordingsServiceEnabled,
|
||||||
_fileRecordingsServiceSharingEnabled
|
_fileRecordingsServiceSharingEnabled
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
@ -74,6 +75,7 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {
|
||||||
titleKey = 'dialog.startRecording'
|
titleKey = 'dialog.startRecording'
|
||||||
width = 'small'>
|
width = 'small'>
|
||||||
<StartRecordingDialogContent
|
<StartRecordingDialogContent
|
||||||
|
fileRecordingsEnabled = { _fileRecordingsEnabled }
|
||||||
fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }
|
fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }
|
||||||
fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }
|
fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }
|
||||||
integrationsEnabled = { this._areIntegrationsEnabled() }
|
integrationsEnabled = { this._areIntegrationsEnabled() }
|
||||||
|
|
|
@ -151,11 +151,17 @@ export function getRecordButtonProps(state: Object): ?string {
|
||||||
const isModerator = isLocalParticipantModerator(state);
|
const isModerator = isLocalParticipantModerator(state);
|
||||||
const {
|
const {
|
||||||
enableFeaturesBasedOnToken,
|
enableFeaturesBasedOnToken,
|
||||||
fileRecordingsEnabled
|
fileRecordingsEnabled,
|
||||||
|
localRecording
|
||||||
} = state['features/base/config'];
|
} = state['features/base/config'];
|
||||||
const { features = {} } = getLocalParticipant(state);
|
const { features = {} } = getLocalParticipant(state);
|
||||||
|
let localRecordingEnabled = !localRecording?.disable;
|
||||||
|
|
||||||
visible = isModerator && fileRecordingsEnabled;
|
if (navigator.product === 'ReactNative') {
|
||||||
|
localRecordingEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
visible = isModerator && (fileRecordingsEnabled || localRecordingEnabled);
|
||||||
|
|
||||||
if (enableFeaturesBasedOnToken) {
|
if (enableFeaturesBasedOnToken) {
|
||||||
visible = visible && String(features.recording) === 'true';
|
visible = visible && String(features.recording) === 'true';
|
||||||
|
|
|
@ -147,6 +147,10 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
||||||
dispatch(playSound(RECORDING_ON_SOUND_ID));
|
dispatch(playSound(RECORDING_ON_SOUND_ID));
|
||||||
}
|
}
|
||||||
dispatch(showNotification(props, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));
|
dispatch(showNotification(props, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));
|
||||||
|
dispatch(showNotification({
|
||||||
|
titleKey: 'recording.localRecordingStartWarningTitle',
|
||||||
|
descriptionKey: 'recording.localRecordingStartWarning'
|
||||||
|
}, NOTIFICATION_TIMEOUT_TYPE.STICKY));
|
||||||
dispatch(updateLocalRecordingStatus(true, onlySelf));
|
dispatch(updateLocalRecordingStatus(true, onlySelf));
|
||||||
sendAnalytics(createRecordingEvent('started', `local${onlySelf ? '.self' : ''}`));
|
sendAnalytics(createRecordingEvent('started', `local${onlySelf ? '.self' : ''}`));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue