ref(toolbar): show recording features based on explicit configs (#3080)
* ref(toolbar): show recording features based on explicit configs * squash: bring back button configs, use final config names * squash: update interfaceConfig comment, remove unused config whitelist * squash: change order of button enabled checks to reduce diff * squash: fileRecording -> fileRecordings
This commit is contained in:
parent
3e79926ad4
commit
84f303dd3c
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
||||
// Misc
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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')
|
||||
&& <OverflowMenuLiveStreamingItem
|
||||
key = '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'
|
||||
|
|
Loading…
Reference in New Issue