|
|
@@ -5,6 +5,7 @@ import React, { Component } from 'react';
|
|
5
|
5
|
import { createScreenSharingIssueEvent, sendAnalytics } from '../../../analytics';
|
|
6
|
6
|
import { AudioLevelIndicator } from '../../../audio-level-indicator';
|
|
7
|
7
|
import { Avatar } from '../../../base/avatar';
|
|
|
8
|
+import { isNameReadOnly } from '../../../base/config';
|
|
8
|
9
|
import { isMobileBrowser } from '../../../base/environment/utils';
|
|
9
|
10
|
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
|
|
10
|
11
|
import { MEDIA_TYPE, VideoTrack } from '../../../base/media';
|
|
|
@@ -73,6 +74,11 @@ export type State = {|
|
|
73
|
74
|
*/
|
|
74
|
75
|
export type Props = {|
|
|
75
|
76
|
|
|
|
77
|
+ /**
|
|
|
78
|
+ * If the display name is editable or not.
|
|
|
79
|
+ */
|
|
|
80
|
+ _allowEditing: boolean,
|
|
|
81
|
+
|
|
76
|
82
|
/**
|
|
77
|
83
|
* The audio track related to the participant.
|
|
78
|
84
|
*/
|
|
|
@@ -103,11 +109,6 @@ export type Props = {|
|
|
103
|
109
|
*/
|
|
104
|
110
|
_disableLocalVideoFlip: boolean,
|
|
105
|
111
|
|
|
106
|
|
- /**
|
|
107
|
|
- * Indicates whether the profile functionality is disabled.
|
|
108
|
|
- */
|
|
109
|
|
- _disableProfile: boolean,
|
|
110
|
|
-
|
|
111
|
112
|
/**
|
|
112
|
113
|
* The display mode of the thumbnail.
|
|
113
|
114
|
*/
|
|
|
@@ -763,13 +764,13 @@ class Thumbnail extends Component<Props, State> {
|
|
763
|
764
|
*/
|
|
764
|
765
|
_renderLocalParticipant() {
|
|
765
|
766
|
const {
|
|
|
767
|
+ _allowEditing,
|
|
766
|
768
|
_defaultLocalDisplayName,
|
|
767
|
769
|
_disableLocalVideoFlip,
|
|
768
|
770
|
_isMobile,
|
|
769
|
771
|
_isMobilePortrait,
|
|
770
|
772
|
_isScreenSharing,
|
|
771
|
773
|
_localFlipX,
|
|
772
|
|
- _disableProfile,
|
|
773
|
774
|
_participant,
|
|
774
|
775
|
_videoTrack
|
|
775
|
776
|
} = this.props;
|
|
|
@@ -820,7 +821,7 @@ class Thumbnail extends Component<Props, State> {
|
|
820
|
821
|
className = 'displayNameContainer'
|
|
821
|
822
|
onClick = { onClick }>
|
|
822
|
823
|
<DisplayName
|
|
823
|
|
- allowEditing = { !_disableProfile }
|
|
|
824
|
+ allowEditing = { _allowEditing }
|
|
824
|
825
|
displayNameSuffix = { _defaultLocalDisplayName }
|
|
825
|
826
|
elementID = 'localDisplayName'
|
|
826
|
827
|
participantID = { id } />
|
|
|
@@ -1053,7 +1054,6 @@ function _mapStateToProps(state, ownProps): Object {
|
|
1053
|
1054
|
const {
|
|
1054
|
1055
|
startSilent,
|
|
1055
|
1056
|
disableLocalVideoFlip,
|
|
1056
|
|
- disableProfile,
|
|
1057
|
1057
|
iAmRecorder,
|
|
1058
|
1058
|
iAmSipGateway
|
|
1059
|
1059
|
} = state['features/base/config'];
|
|
|
@@ -1102,6 +1102,7 @@ function _mapStateToProps(state, ownProps): Object {
|
|
1102
|
1102
|
}
|
|
1103
|
1103
|
|
|
1104
|
1104
|
return {
|
|
|
1105
|
+ _allowEditing: !isNameReadOnly(state),
|
|
1105
|
1106
|
_audioTrack,
|
|
1106
|
1107
|
_connectionIndicatorAutoHideEnabled:
|
|
1107
|
1108
|
Boolean(state['features/base/config'].connectionIndicators?.autoHide ?? true),
|
|
|
@@ -1110,7 +1111,6 @@ function _mapStateToProps(state, ownProps): Object {
|
|
1110
|
1111
|
_currentLayout,
|
|
1111
|
1112
|
_defaultLocalDisplayName: interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME,
|
|
1112
|
1113
|
_disableLocalVideoFlip: Boolean(disableLocalVideoFlip),
|
|
1113
|
|
- _disableProfile: disableProfile,
|
|
1114
|
1114
|
_isHidden: isLocal && iAmRecorder && !iAmSipGateway,
|
|
1115
|
1115
|
_isAudioOnly: Boolean(state['features/base/audio-only'].enabled),
|
|
1116
|
1116
|
_isCurrentlyOnLargeVideo: state['features/large-video']?.participantId === id,
|