|
@@ -10,6 +10,7 @@ import { MEDIA_TYPE, VIDEO_TYPE, Audio } from '../../../base/media';
|
10
|
10
|
import {
|
11
|
11
|
PARTICIPANT_ROLE,
|
12
|
12
|
ParticipantView,
|
|
13
|
+ getParticipantCount,
|
13
|
14
|
isEveryoneModerator,
|
14
|
15
|
pinParticipant
|
15
|
16
|
} from '../../../base/participants';
|
|
@@ -59,6 +60,11 @@ type Props = {
|
59
|
60
|
*/
|
60
|
61
|
_onShowRemoteVideoMenu: ?Function,
|
61
|
62
|
|
|
63
|
+ /**
|
|
64
|
+ * Whether to show the dominant speaker indicator or not.
|
|
65
|
+ */
|
|
66
|
+ _showDominantSpeakerIndicator: boolean,
|
|
67
|
+
|
62
|
68
|
/**
|
63
|
69
|
* The color-schemed stylesheet of the feature.
|
64
|
70
|
*/
|
|
@@ -121,6 +127,7 @@ class Thumbnail extends Component<Props> {
|
121
|
127
|
_largeVideo: largeVideo,
|
122
|
128
|
_onClick,
|
123
|
129
|
_onShowRemoteVideoMenu,
|
|
130
|
+ _showDominantSpeakerIndicator: showDominantSpeakerIndicator,
|
124
|
131
|
_styles,
|
125
|
132
|
_videoTrack: videoTrack,
|
126
|
133
|
disableTint,
|
|
@@ -182,8 +189,7 @@ class Thumbnail extends Component<Props> {
|
182
|
189
|
styles.thumbnailTopLeftIndicatorContainer
|
183
|
190
|
] }>
|
184
|
191
|
<RaisedHandIndicator participantId = { participant.id } />
|
185
|
|
- { participant.dominantSpeaker
|
186
|
|
- && <DominantSpeakerIndicator /> }
|
|
192
|
+ { showDominantSpeakerIndicator && <DominantSpeakerIndicator /> }
|
187
|
193
|
</View>
|
188
|
194
|
|
189
|
195
|
<View
|
|
@@ -255,12 +261,7 @@ function _mapDispatchToProps(dispatch: Function, ownProps): Object {
|
255
|
261
|
*
|
256
|
262
|
* @param {Object} state - Redux state.
|
257
|
263
|
* @param {Props} ownProps - Properties of component.
|
258
|
|
- * @returns {{
|
259
|
|
- * _audioTrack: Track,
|
260
|
|
- * _largeVideo: Object,
|
261
|
|
- * _styles: StyleType,
|
262
|
|
- * _videoTrack: Track
|
263
|
|
- * }}
|
|
264
|
+ * @returns {Object}
|
264
|
265
|
*/
|
265
|
266
|
function _mapStateToProps(state, ownProps) {
|
266
|
267
|
// We need read-only access to the state of features/large-video so that the
|
|
@@ -273,11 +274,14 @@ function _mapStateToProps(state, ownProps) {
|
273
|
274
|
= getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.AUDIO, id);
|
274
|
275
|
const videoTrack
|
275
|
276
|
= getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, id);
|
|
277
|
+ const participantCount = getParticipantCount(state);
|
|
278
|
+ const showDominantSpeakerIndicator = ownProps.participant.dominantSpeaker && participantCount > 2;
|
276
|
279
|
|
277
|
280
|
return {
|
278
|
281
|
_audioTrack: audioTrack,
|
279
|
282
|
_isEveryoneModerator: isEveryoneModerator(state),
|
280
|
283
|
_largeVideo: largeVideo,
|
|
284
|
+ _showDominantSpeakerIndicator: showDominantSpeakerIndicator,
|
281
|
285
|
_styles: ColorSchemeRegistry.get(state, 'Thumbnail'),
|
282
|
286
|
_videoTrack: videoTrack
|
283
|
287
|
};
|