Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(jaas) add config for displaying participants stats and conference subject

Tudor-Ovidiu Avramd49c5a6d8cc2
diff --git a/config.js b/config.js
index 9f8c20cdea..71d659fc90 100644
--- a/config.js
+++ b/config.js
@@ -623,9 +623,15 @@ var config = {
// otherwise the app doesn't render it.
// moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com',
+ // Hides the conference subject
+ // hideConferenceSubject: true
+
// Hides the conference timer.
// hideConferenceTimer: true,
+ // Hides the participants stats
+ // hideParticipantsStats: true
+
// Sets the conference subject
// subject: 'Conference Subject',
diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js
index de13119b90..76c8194128 100644
--- a/react/features/base/config/configWhitelist.js
+++ b/react/features/base/config/configWhitelist.js
@@ -117,6 +117,8 @@ export default [
'forceTurnRelay',
'gatherStats',
'googleApiApplicationClientID',
+ 'hideConferenceSubject',
+ 'hideParticipantsStats',
'hideConferenceTimer',
'hiddenDomain',
'hideLobbyButton',
diff --git a/react/features/conference/components/native/NavigationBar.js b/react/features/conference/components/native/NavigationBar.js
index 2b8a085afb..a94e2eff70 100644
--- a/react/features/conference/components/native/NavigationBar.js
+++ b/react/features/conference/components/native/NavigationBar.js
@@ -95,11 +95,14 @@ class NavigationBar extends Component<Props> {
* @returns {Props}
*/
function _mapStateToProps(state) {
+ const { hideConferenceTimer, hideConferenceSubject } = state['features/base/config'];
+
return {
_conferenceTimerEnabled:
- getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !state['features/base/config'].hideConferenceTimer,
+ getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !hideConferenceTimer,
_meetingName: getConferenceName(state),
- _meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true),
+ _meetingNameEnabled:
+ getFeatureFlag(state, MEETING_NAME_ENABLED, true) && !hideConferenceSubject,
_visible: isToolboxVisible(state)
};
}
diff --git a/react/features/conference/components/web/Subject.js b/react/features/conference/components/web/Subject.js
index a8e2f87306..de2883e96d 100644
--- a/react/features/conference/components/web/Subject.js
+++ b/react/features/conference/components/web/Subject.js
@@ -25,6 +25,11 @@ type Props = {
*/
_showParticipantCount: boolean,
+ /**
+ * Whether the conference subject should be shown or not.
+ */
+ _showSubject: boolean,
+
/**
* The subject or the of the conference.
* Falls back to conference name.
@@ -51,11 +56,11 @@ class Subject extends Component<Props> {
* @returns {ReactElement}
*/
render() {
- const { _hideConferenceTimer, _showParticipantCount, _subject, _visible } = this.props;
+ const { _hideConferenceTimer, _showParticipantCount, _showSubject, _subject, _visible } = this.props;
return (
<div className = { `subject ${_visible ? 'visible' : ''}` }>
- <span className = 'subject-text'>{ _subject }</span>
+ { _showSubject && <span className = 'subject-text'>{ _subject }</span>}
{ _showParticipantCount && <ParticipantsCount /> }
{ !_hideConferenceTimer && <ConferenceTimer /> }
</div>
@@ -72,16 +77,19 @@ class Subject extends Component<Props> {
* @returns {{
* _hideConferenceTimer: boolean,
* _showParticipantCount: boolean,
+ * _showSubject: boolean,
* _subject: string,
* _visible: boolean
* }}
*/
function _mapStateToProps(state) {
const participantCount = getParticipantCount(state);
+ const { hideConferenceTimer, hideConferenceSubject, hideParticipantsStats } = state['features/base/config'];
return {
- _hideConferenceTimer: Boolean(state['features/base/config'].hideConferenceTimer),
- _showParticipantCount: participantCount > 2,
+ _hideConferenceTimer: Boolean(hideConferenceTimer),
+ _showParticipantCount: participantCount > 2 && !hideParticipantsStats,
+ _showSubject: !hideConferenceSubject,
_subject: getConferenceName(state),
_visible: isToolboxVisible(state) && participantCount > 1
};