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(conference/large-video): hide display name label based on config

Calinteodorac2d73b57c35
diff --git a/react/features/conference/components/native/Conference.tsx b/react/features/conference/components/native/Conference.tsx
index 628a4eb3cd..6c44ad422d 100644
--- a/react/features/conference/components/native/Conference.tsx
+++ b/react/features/conference/components/native/Conference.tsx
@@ -15,6 +15,7 @@ import { connect, useDispatch } from 'react-redux';
import { appNavigate } from '../../../app/actions.native';
import { IReduxState, IStore } from '../../../app/types';
import { CONFERENCE_BLURRED, CONFERENCE_FOCUSED } from '../../../base/conference/actionTypes';
+import { isDisplayNameVisible } from '../../../base/config/functions.native';
import { FULLSCREEN_ENABLED } from '../../../base/flags/constants';
import { getFeatureFlag } from '../../../base/flags/functions';
import Container from '../../../base/react/components/native/Container';
@@ -100,6 +101,11 @@ interface IProps extends AbstractProps {
*/
_fullscreenEnabled: boolean;
+ /**
+ * The indicator which determines if the display name is visible.
+ */
+ _isDisplayNameVisible: boolean;
+
/**
* The indicator which determines if the participants pane is open.
*/
@@ -364,6 +370,7 @@ class Conference extends AbstractConference<IProps, State> {
_aspectRatio,
_connecting,
_filmstripVisible,
+ _isDisplayNameVisible,
_largeVideoParticipantId,
_reducedUI,
_shouldDisplayTileView,
@@ -420,10 +427,12 @@ class Conference extends AbstractConference<IProps, State> {
{
_shouldDisplayTileView
- || <Container style = { styles.displayNameContainer }>
- <DisplayNameLabel
- participantId = { _largeVideoParticipantId } />
- </Container>
+ || (_isDisplayNameVisible && (
+ <Container style = { styles.displayNameContainer }>
+ <DisplayNameLabel
+ participantId = { _largeVideoParticipantId } />
+ </Container>
+ ))
}
{ !_shouldDisplayTileView && <LonelyMeetingExperience /> }
@@ -577,6 +586,7 @@ function _mapStateToProps(state: IReduxState, _ownProps: any) {
_connecting: isConnecting(state),
_filmstripVisible: isFilmstripVisible(state),
_fullscreenEnabled: getFeatureFlag(state, FULLSCREEN_ENABLED, true),
+ _isDisplayNameVisible: isDisplayNameVisible(state),
_isParticipantsPaneOpen: isOpen,
_largeVideoParticipantId: state['features/large-video'].participantId,
_pictureInPictureEnabled: isPipEnabled(state),
diff --git a/react/features/large-video/components/LargeVideo.web.tsx b/react/features/large-video/components/LargeVideo.web.tsx
index 1bd2e10fd2..83e1bf167c 100644
--- a/react/features/large-video/components/LargeVideo.web.tsx
+++ b/react/features/large-video/components/LargeVideo.web.tsx
@@ -4,6 +4,7 @@ import { connect } from 'react-redux';
// @ts-expect-error
import VideoLayout from '../../../../modules/UI/videolayout/VideoLayout';
import { IReduxState, IStore } from '../../app/types';
+import { isDisplayNameVisible } from '../../base/config/functions.web';
import { VIDEO_TYPE } from '../../base/media/constants';
import { getLocalParticipant } from '../../base/participants/functions';
import Watermarks from '../../base/react/components/web/Watermarks';
@@ -58,6 +59,11 @@ interface IProps {
*/
_isChatOpen: boolean;
+ /**
+ * Whether or not the display name is visible.
+ */
+ _isDisplayNameVisible: boolean;
+
/**
* Whether or not the local screen share is on large-video.
*/
@@ -191,6 +197,7 @@ class LargeVideo extends Component<IProps> {
const {
_displayScreenSharingPlaceholder,
_isChatOpen,
+ _isDisplayNameVisible,
_noAutoPlayVideo,
_showDominantSpeakerBadge,
_whiteboardEnabled
@@ -243,7 +250,12 @@ class LargeVideo extends Component<IProps> {
</div>
{ interfaceConfig.DISABLE_TRANSCRIPTION_SUBTITLES
|| <Captions /> }
- {_showDominantSpeakerBadge && <StageParticipantNameLabel />}
+ {
+ _isDisplayNameVisible
+ && (
+ _showDominantSpeakerBadge && <StageParticipantNameLabel />
+ )
+ }
</div>
);
}
@@ -368,6 +380,7 @@ function _mapStateToProps(state: IReduxState) {
_displayScreenSharingPlaceholder: Boolean(isLocalScreenshareOnLargeVideo && !seeWhatIsBeingShared && !isOnSpot),
_hideSelfView: getHideSelfView(state),
_isChatOpen: isChatOpen,
+ _isDisplayNameVisible: isDisplayNameVisible(state),
_isScreenSharing: Boolean(isLocalScreenshareOnLargeVideo),
_largeVideoParticipantId: largeVideoParticipant?.id ?? '',
_localParticipantId: localParticipantId ?? '',