feat(jaas) add config for displaying participants stats and conference subject
This commit is contained in:
parent
3881da5db9
commit
d49c5a6d8c
|
@ -623,9 +623,15 @@ var config = {
|
||||||
// otherwise the app doesn't render it.
|
// otherwise the app doesn't render it.
|
||||||
// moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com',
|
// moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com',
|
||||||
|
|
||||||
|
// Hides the conference subject
|
||||||
|
// hideConferenceSubject: true
|
||||||
|
|
||||||
// Hides the conference timer.
|
// Hides the conference timer.
|
||||||
// hideConferenceTimer: true,
|
// hideConferenceTimer: true,
|
||||||
|
|
||||||
|
// Hides the participants stats
|
||||||
|
// hideParticipantsStats: true
|
||||||
|
|
||||||
// Sets the conference subject
|
// Sets the conference subject
|
||||||
// subject: 'Conference Subject',
|
// subject: 'Conference Subject',
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,8 @@ export default [
|
||||||
'forceTurnRelay',
|
'forceTurnRelay',
|
||||||
'gatherStats',
|
'gatherStats',
|
||||||
'googleApiApplicationClientID',
|
'googleApiApplicationClientID',
|
||||||
|
'hideConferenceSubject',
|
||||||
|
'hideParticipantsStats',
|
||||||
'hideConferenceTimer',
|
'hideConferenceTimer',
|
||||||
'hiddenDomain',
|
'hiddenDomain',
|
||||||
'hideLobbyButton',
|
'hideLobbyButton',
|
||||||
|
|
|
@ -95,11 +95,14 @@ class NavigationBar extends Component<Props> {
|
||||||
* @returns {Props}
|
* @returns {Props}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
|
const { hideConferenceTimer, hideConferenceSubject } = state['features/base/config'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_conferenceTimerEnabled:
|
_conferenceTimerEnabled:
|
||||||
getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !state['features/base/config'].hideConferenceTimer,
|
getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !hideConferenceTimer,
|
||||||
_meetingName: getConferenceName(state),
|
_meetingName: getConferenceName(state),
|
||||||
_meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true),
|
_meetingNameEnabled:
|
||||||
|
getFeatureFlag(state, MEETING_NAME_ENABLED, true) && !hideConferenceSubject,
|
||||||
_visible: isToolboxVisible(state)
|
_visible: isToolboxVisible(state)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_showParticipantCount: boolean,
|
_showParticipantCount: boolean,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the conference subject should be shown or not.
|
||||||
|
*/
|
||||||
|
_showSubject: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The subject or the of the conference.
|
* The subject or the of the conference.
|
||||||
* Falls back to conference name.
|
* Falls back to conference name.
|
||||||
|
@ -51,11 +56,11 @@ class Subject extends Component<Props> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { _hideConferenceTimer, _showParticipantCount, _subject, _visible } = this.props;
|
const { _hideConferenceTimer, _showParticipantCount, _showSubject, _subject, _visible } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = { `subject ${_visible ? 'visible' : ''}` }>
|
<div className = { `subject ${_visible ? 'visible' : ''}` }>
|
||||||
<span className = 'subject-text'>{ _subject }</span>
|
{ _showSubject && <span className = 'subject-text'>{ _subject }</span>}
|
||||||
{ _showParticipantCount && <ParticipantsCount /> }
|
{ _showParticipantCount && <ParticipantsCount /> }
|
||||||
{ !_hideConferenceTimer && <ConferenceTimer /> }
|
{ !_hideConferenceTimer && <ConferenceTimer /> }
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,16 +77,19 @@ class Subject extends Component<Props> {
|
||||||
* @returns {{
|
* @returns {{
|
||||||
* _hideConferenceTimer: boolean,
|
* _hideConferenceTimer: boolean,
|
||||||
* _showParticipantCount: boolean,
|
* _showParticipantCount: boolean,
|
||||||
|
* _showSubject: boolean,
|
||||||
* _subject: string,
|
* _subject: string,
|
||||||
* _visible: boolean
|
* _visible: boolean
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
const participantCount = getParticipantCount(state);
|
const participantCount = getParticipantCount(state);
|
||||||
|
const { hideConferenceTimer, hideConferenceSubject, hideParticipantsStats } = state['features/base/config'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_hideConferenceTimer: Boolean(state['features/base/config'].hideConferenceTimer),
|
_hideConferenceTimer: Boolean(hideConferenceTimer),
|
||||||
_showParticipantCount: participantCount > 2,
|
_showParticipantCount: participantCount > 2 && !hideParticipantsStats,
|
||||||
|
_showSubject: !hideConferenceSubject,
|
||||||
_subject: getConferenceName(state),
|
_subject: getConferenceName(state),
|
||||||
_visible: isToolboxVisible(state) && participantCount > 1
|
_visible: isToolboxVisible(state) && participantCount > 1
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue