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
ref(toolbar): show recording features based on explicit configs (#3080)
virtuacoplenny84f303dd3c72
diff --git a/conference.js b/conference.jsindex 86576b1baf..fd8726cb05 100644--- a/conference.js+++ b/conference.js@@ -1255,13 +1255,6 @@ export default {_getConferenceOptions() {const options = config;- if (config.enableRecording && !config.recordingType) {- options.recordingType- = config.hosts && (typeof config.hosts.jirecon !== 'undefined')- ? 'jirecon'- : 'colibri';- }-const nick = APP.store.getState()['features/base/settings'].displayName;if (nick) {diff --git a/config.js b/config.jsindex 45be4437fd..5f4323d940 100644--- a/config.js+++ b/config.js@@ -167,11 +167,11 @@ var config = {// Recording- // Whether to enable recording or not.- // enableRecording: false,+ // Whether to enable file recording or not.+ // fileRecordingsEnabled: false,- // Type for recording: one of jibri or jirecon.- // recordingType: 'jibri',+ // Whether to enable live streaming or not.+ // liveStreamingEnabled: false,// Miscdiff --git a/interface_config.js b/interface_config.jsindex 2fd8c6c964..5cc8772854 100644--- a/interface_config.js+++ b/interface_config.js@@ -38,15 +38,14 @@ var interfaceConfig = {AUTHENTICATION_ENABLE: true,/**- * the toolbar buttons line is intentionally left in one line, to be able- * to easily override values or remove them using regex+ * The name of the toolbar buttons to display in the toolbar. If present,+ * the button will display. Exceptions are "livestreaming" and "recording"+ * which also require being a moderator and some values in config.js to be+ * enabled. Also, the "profile" button will not display for user's with a+ * jwt.*/TOOLBAR_BUTTONS: [-- // main toolbar'microphone', 'camera', 'desktop', 'fullscreen', 'fodeviceselection', 'hangup',-- // extended toolbar'profile', 'info', 'chat', 'recording', 'livestreaming', 'etherpad','sharedvideo', 'settings', 'raisehand', 'videoquality', 'filmstrip','invite', 'feedback', 'stats', 'shortcuts'diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex 97642c9f6b..13bdad9186 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -351,7 +351,7 @@ UI.start = function() {APP.store.dispatch(setNotificationsEnabled(false));} else {// Initialize recording mode UI.- if (config.enableRecording && config.iAmRecorder) {+ if (config.iAmRecorder) {VideoLayout.enableDeviceAvailabilityIcons(APP.conference.getMyUserId(), false);diff --git a/react/features/base/config/functions.js b/react/features/base/config/functions.jsindex 6f101082cb..f6baf26d8a 100644--- a/react/features/base/config/functions.js+++ b/react/features/base/config/functions.js@@ -87,7 +87,6 @@ const WHITELISTED_KEYS = ['enableDisplayNameInStats','enableLipSync','enableLocalVideoFlip',- 'enableRecording','enableRemb','enableStatsID','enableTalkWhileMuted',@@ -95,6 +94,7 @@ const WHITELISTED_KEYS = ['enableUserRolesBasedOnToken','etherpad_base','failICE',+ 'fileRecordingsEnabled','firefox_fake_device','forceJVB121Ratio','gatherStats',@@ -105,12 +105,12 @@ const WHITELISTED_KEYS = ['iAmSipGateway','iceTransportPolicy','ignoreStartMuted',+ 'liveStreamingEnabled','minParticipants','nick','openBridgeChannel','p2p','preferH264',- 'recordingType','requireDisplayName','resolution','startAudioMuted',diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.jsindex d04cbe7492..b97823c7fd 100644--- a/react/features/toolbox/components/web/Toolbox.js+++ b/react/features/toolbox/components/web/Toolbox.js@@ -103,6 +103,11 @@ type Props = {*/_feedbackConfigured: boolean,+ /**+ * Whether or not the file recording feature is enabled for use.+ */+ _fileRecordingsEnabled: boolean,+/*** The current file recording session, if any.*/@@ -124,6 +129,11 @@ type Props = {*/_isGuest: boolean,+ /**+ * Whether or not the live streaming feature is enabled for use.+ */+ _liveStreamingEnabled: boolean,+/*** The current live streaming session, if any.*/@@ -144,11 +154,6 @@ type Props = {*/_raisedHand: boolean,- /**- * Whether or not the recording feature is enabled for use.- */- _recordingEnabled: boolean,-/*** Whether or not the local participant is screensharing.*/@@ -959,10 +964,11 @@ class Toolbox extends Component<Props> {_editingDocument,_etherpadInitialized,_feedbackConfigured,+ _fileRecordingsEnabled,_fullScreen,_isGuest,+ _liveStreamingEnabled,_liveStreamingSession,- _recordingEnabled,_sharingVideo,t} = this.props;@@ -988,13 +994,13 @@ class Toolbox extends Component<Props> {text = { _fullScreen? t('toolbar.exitFullScreen'): t('toolbar.enterFullScreen') } />,- _recordingEnabled+ _liveStreamingEnabled&& this._shouldShowButton('livestreaming')&& <OverflowMenuLiveStreamingItemkey = 'livestreaming'onClick = { this._onToolbarToggleLiveStreaming }session = { _liveStreamingSession } />,- _recordingEnabled+ _fileRecordingsEnabled&& this._shouldShowButton('recording')&& this._renderRecordingButton(),this._shouldShowButton('sharedvideo')@@ -1100,8 +1106,9 @@ function _mapStateToProps(state) {const {callStatsID,disableDesktopSharing,- enableRecording,- iAmRecorder+ fileRecordingsEnabled,+ iAmRecorder,+ liveStreamingEnabled} = state['features/base/config'];const sharedVideoStatus = state['features/shared-video'].status;const { current } = state['features/side-panel'];@@ -1130,15 +1137,16 @@ function _mapStateToProps(state) {_hideInviteButton:iAmRecorder || (!addPeopleEnabled && !dialOutEnabled),_isGuest: state['features/base/jwt'].isGuest,+ _fileRecordingsEnabled: isModerator && fileRecordingsEnabled,_fileRecordingSession:getActiveSession(state, JitsiRecordingConstants.mode.FILE),_fullScreen: fullScreen,+ _liveStreamingEnabled: isModerator && liveStreamingEnabled,_liveStreamingSession:getActiveSession(state, JitsiRecordingConstants.mode.STREAM),_localParticipantID: localParticipant.id,_overflowMenuVisible: overflowMenuVisible,_raisedHand: localParticipant.raisedHand,- _recordingEnabled: isModerator && enableRecording,_screensharing: localVideo && localVideo.videoType === 'desktop',_sharingVideo: sharedVideoStatus === 'playing'|| sharedVideoStatus === 'start'