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
fix(highlight) display option to start recording (#11146)
Avram Tudor8456a63a23fd
diff --git a/react/features/recording/actions.any.js b/react/features/recording/actions.any.jsindex 429bb3132c..909d3d23d1 100644--- a/react/features/recording/actions.any.js+++ b/react/features/recording/actions.any.js@@ -132,14 +132,13 @@ export function highlightMeetingMoment() {return async (dispatch: Function, getState: Function) => {dispatch(setHighlightMomentButtonState(true));- try {- await sendMeetingHighlight(getState());+ const success = await sendMeetingHighlight(getState());++ if (success) {dispatch(showNotification({descriptionKey: 'recording.highlightMomentSucessDescription',titleKey: 'recording.highlightMomentSuccess'}));- } catch (err) {- logger.error('Could not highlight meeting moment', err);}dispatch(setHighlightMomentButtonState(false));diff --git a/react/features/recording/components/Recording/AbstractHighlightButton.js b/react/features/recording/components/Recording/AbstractHighlightButton.jsindex a9cad6629b..f603f71cfe 100644--- a/react/features/recording/components/Recording/AbstractHighlightButton.js+++ b/react/features/recording/components/Recording/AbstractHighlightButton.js@@ -1,10 +1,20 @@// @flowimport { Component } from 'react';+import { batch } from 'react-redux';import { getActiveSession, isHighlightMeetingMomentDisabled } from '../..';+import { openDialog } from '../../../base/dialog';import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';+import {+ hideNotification,+ NOTIFICATION_TIMEOUT_TYPE,+ NOTIFICATION_TYPE,+ showNotification+} from '../../../notifications';import { highlightMeetingMoment } from '../../actions.any';+import { StartRecordingDialog } from '../../components';+import { PROMPT_RECORDING_NOTIFICATION_ID } from '../../constants';export type Props = {@@ -45,7 +55,21 @@ export default class AbstractHighlightButton<P: Props> extends Component<P> {_onClick() {const { _disabled, dispatch } = this.props;- if (!_disabled) {+ if (_disabled) {+ dispatch(showNotification({+ descriptionKey: 'recording.highlightMomentDisabled',+ titleKey: 'recording.highlightMoment',+ uid: PROMPT_RECORDING_NOTIFICATION_ID,+ customActionNameKey: [ 'localRecording.start' ],+ customActionHandler: [ () => {+ batch(() => {+ dispatch(hideNotification(PROMPT_RECORDING_NOTIFICATION_ID));+ dispatch(openDialog(StartRecordingDialog));+ });+ } ],+ appearance: NOTIFICATION_TYPE.NORMAL+ }, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));+ } else {dispatch(highlightMeetingMoment());}}diff --git a/react/features/recording/constants.js b/react/features/recording/constants.jsindex 706e608bb4..c72ac2d6b5 100644--- a/react/features/recording/constants.js+++ b/react/features/recording/constants.js@@ -17,6 +17,13 @@ export const LIVE_STREAMING_OFF_SOUND_ID = 'LIVE_STREAMING_OFF_SOUND';*/export const LIVE_STREAMING_ON_SOUND_ID = 'LIVE_STREAMING_ON_SOUND';+/**+ * The identifier of the prompt to start recording notification.+ *+ * @type {string}+ */+export const PROMPT_RECORDING_NOTIFICATION_ID = 'PROMPT_RECORDING_NOTIFICATION_ID';+/*** The identifier of the sound to be played when a recording session is stopped.*