|
|
@@ -40,11 +40,6 @@ type Props = {
|
|
40
|
40
|
*/
|
|
41
|
41
|
_audioTrack: Object,
|
|
42
|
42
|
|
|
43
|
|
- /**
|
|
44
|
|
- * True if everone in the meeting is moderator.
|
|
45
|
|
- */
|
|
46
|
|
- _isEveryoneModerator: boolean,
|
|
47
|
|
-
|
|
48
|
43
|
/**
|
|
49
|
44
|
* The Redux representation of the state "features/large-video".
|
|
50
|
45
|
*/
|
|
|
@@ -63,7 +58,12 @@ type Props = {
|
|
63
|
58
|
/**
|
|
64
|
59
|
* Whether to show the dominant speaker indicator or not.
|
|
65
|
60
|
*/
|
|
66
|
|
- _showDominantSpeakerIndicator: boolean,
|
|
|
61
|
+ _renderDominantSpeakerIndicator: boolean,
|
|
|
62
|
+
|
|
|
63
|
+ /**
|
|
|
64
|
+ * Whether to show the moderator indicator or not.
|
|
|
65
|
+ */
|
|
|
66
|
+ _renderModeratorIndicator: boolean,
|
|
67
|
67
|
|
|
68
|
68
|
/**
|
|
69
|
69
|
* The color-schemed stylesheet of the feature.
|
|
|
@@ -123,11 +123,11 @@ class Thumbnail extends Component<Props> {
|
|
123
|
123
|
render() {
|
|
124
|
124
|
const {
|
|
125
|
125
|
_audioTrack: audioTrack,
|
|
126
|
|
- _isEveryoneModerator,
|
|
127
|
126
|
_largeVideo: largeVideo,
|
|
128
|
127
|
_onClick,
|
|
129
|
128
|
_onShowRemoteVideoMenu,
|
|
130
|
|
- _showDominantSpeakerIndicator: showDominantSpeakerIndicator,
|
|
|
129
|
+ _renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
|
|
|
130
|
+ _renderModeratorIndicator: renderModeratorIndicator,
|
|
131
|
131
|
_styles,
|
|
132
|
132
|
_videoTrack: videoTrack,
|
|
133
|
133
|
disableTint,
|
|
|
@@ -178,7 +178,7 @@ class Thumbnail extends Component<Props> {
|
|
178
|
178
|
|
|
179
|
179
|
{ renderDisplayName && <DisplayNameLabel participantId = { participantId } /> }
|
|
180
|
180
|
|
|
181
|
|
- { !_isEveryoneModerator && participant.role === PARTICIPANT_ROLE.MODERATOR
|
|
|
181
|
+ { renderModeratorIndicator
|
|
182
|
182
|
&& <View style = { styles.moderatorIndicatorContainer }>
|
|
183
|
183
|
<ModeratorIndicator />
|
|
184
|
184
|
</View> }
|
|
|
@@ -189,7 +189,7 @@ class Thumbnail extends Component<Props> {
|
|
189
|
189
|
styles.thumbnailTopLeftIndicatorContainer
|
|
190
|
190
|
] }>
|
|
191
|
191
|
<RaisedHandIndicator participantId = { participant.id } />
|
|
192
|
|
- { showDominantSpeakerIndicator && <DominantSpeakerIndicator /> }
|
|
|
192
|
+ { renderDominantSpeakerIndicator && <DominantSpeakerIndicator /> }
|
|
193
|
193
|
</View>
|
|
194
|
194
|
|
|
195
|
195
|
<View
|
|
|
@@ -269,19 +269,22 @@ function _mapStateToProps(state, ownProps) {
|
|
269
|
269
|
// the stage i.e. as a large video.
|
|
270
|
270
|
const largeVideo = state['features/large-video'];
|
|
271
|
271
|
const tracks = state['features/base/tracks'];
|
|
272
|
|
- const id = ownProps.participant.id;
|
|
|
272
|
+ const { participant } = ownProps;
|
|
|
273
|
+ const id = participant.id;
|
|
273
|
274
|
const audioTrack
|
|
274
|
275
|
= getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.AUDIO, id);
|
|
275
|
276
|
const videoTrack
|
|
276
|
277
|
= getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, id);
|
|
277
|
278
|
const participantCount = getParticipantCount(state);
|
|
278
|
|
- const showDominantSpeakerIndicator = ownProps.participant.dominantSpeaker && participantCount > 2;
|
|
|
279
|
+ const renderDominantSpeakerIndicator = participant.dominantSpeaker && participantCount > 2;
|
|
|
280
|
+ const _isEveryoneModerator = isEveryoneModerator(state);
|
|
|
281
|
+ const renderModeratorIndicator = !_isEveryoneModerator && participant.role === PARTICIPANT_ROLE.MODERATOR;
|
|
279
|
282
|
|
|
280
|
283
|
return {
|
|
281
|
284
|
_audioTrack: audioTrack,
|
|
282
|
|
- _isEveryoneModerator: isEveryoneModerator(state),
|
|
283
|
285
|
_largeVideo: largeVideo,
|
|
284
|
|
- _showDominantSpeakerIndicator: showDominantSpeakerIndicator,
|
|
|
286
|
+ _renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
|
|
|
287
|
+ _renderModeratorIndicator: renderModeratorIndicator,
|
|
285
|
288
|
_styles: ColorSchemeRegistry.get(state, 'Thumbnail'),
|
|
286
|
289
|
_videoTrack: videoTrack
|
|
287
|
290
|
};
|