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
register shortcuts in the middleware
Radium Zhengcc38fcc5d03e
diff --git a/react/features/local-recording/components/LocalRecordingButton.js b/react/features/local-recording/components/LocalRecordingButton.jsindex a10b7547c3..7d8a18577a 100644--- a/react/features/local-recording/components/LocalRecordingButton.js+++ b/react/features/local-recording/components/LocalRecordingButton.js@@ -81,20 +81,6 @@ class LocalRecordingButton extends Component<Props> {_onClick() {this.props.onClick();}-- _onCloseDialog: () => void;-- /**- * Callback invoked when {@code InlineDialog} signals that it should be- * close.- *- * @returns {void}- */- _onCloseDialog() {- // Do nothing for now, because we want the dialog to stay open- // after certain time, otherwise the moderator might need to repeatly- // open the dialog to see the stats.- }}export default translate(LocalRecordingButton);diff --git a/react/features/local-recording/middleware.js b/react/features/local-recording/middleware.jsindex 3ac2b301f4..dc69573df2 100644--- a/react/features/local-recording/middleware.js+++ b/react/features/local-recording/middleware.js@@ -2,13 +2,17 @@import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app';import { CONFERENCE_JOINED } from '../base/conference';+import { toggleDialog } from '../base/dialog';import { i18next } from '../base/i18n';import { MiddlewareRegistry } from '../base/redux';import { showNotification } from '../notifications';import { localRecordingEngaged, localRecordingUnengaged } from './actions';+import { LocalRecordingInfoDialog } from './components';import { recordingController } from './controller';+declare var APP: Object;+MiddlewareRegistry.register(({ getState, dispatch }) => next => action => {const result = next(action);@@ -45,6 +49,14 @@ MiddlewareRegistry.register(({ getState, dispatch }) => next => action => {description: i18next.t(messageKey, messageParams)}, 10000));};++ // register shortcut+ APP.keyboardshortcut.registerShortcut(+ 'L',+ null,+ () => dispatch(toggleDialog(LocalRecordingInfoDialog)),+ 'keyboardShortcuts.localRecording'+ );break;case APP_WILL_UNMOUNT:recordingController.onStateChanged = null;diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.jsindex 7b20341df8..8503f6a8cc 100644--- a/react/features/toolbox/components/web/Toolbox.js+++ b/react/features/toolbox/components/web/Toolbox.js@@ -237,8 +237,8 @@ class Toolbox extends Component<Props> {= this._onToolbarToggleScreenshare.bind(this);this._onToolbarToggleSharedVideo= this._onToolbarToggleSharedVideo.bind(this);- this._onToolbarToggleLocalRecordingInfoDialog- = this._onToolbarToggleLocalRecordingInfoDialog.bind(this);+ this._onToolbarOpenLocalRecordingInfoDialog+ = this._onToolbarOpenLocalRecordingInfoDialog.bind(this);}/**@@ -268,11 +268,6 @@ class Toolbox extends Component<Props> {character: 'S',exec: this._onShortcutToggleFullScreen,helpDescription: 'keyboardShortcuts.fullScreen'- },- this._shouldShowButton('localrecording') && {- character: 'L',- exec: this._onToolbarToggleLocalRecordingInfoDialog,- helpDescription: 'keyboardShortcuts.localRecording'}];@@ -388,10 +383,8 @@ class Toolbox extends Component<Props> {<div className = 'button-group-right'>{ this._shouldShowButton('localrecording')&& <LocalRecordingButton- isDialogShown =- { this.props._localRecState.showDialog }onClick = {- this._onToolbarToggleLocalRecordingInfoDialog+ this._onToolbarOpenLocalRecordingInfoDialog} />}{ this._shouldShowButton('invite')@@ -864,15 +857,17 @@ class Toolbox extends Component<Props> {this._doToggleSharedVideo();}- _onToolbarToggleLocalRecordingInfoDialog: () => void;+ _onToolbarOpenLocalRecordingInfoDialog: () => void;/**- * Switches local recording on or off.+ * Opens the {@code LocalRecordingInfoDialog}.** @private* @returns {void}*/- _onToolbarToggleLocalRecordingInfoDialog() {+ _onToolbarOpenLocalRecordingInfoDialog() {+ sendAnalytics(createToolbarEvent('local.recording'));+this.props.dispatch(openDialog(LocalRecordingInfoDialog));}