|
@@ -4,6 +4,7 @@ import React, { PureComponent } from 'react';
|
4
|
4
|
import { Image, View } from 'react-native';
|
5
|
5
|
import type { Dispatch } from 'redux';
|
6
|
6
|
|
|
7
|
+import { getMultipleVideoSupportFeatureFlag } from '../../../base/config';
|
7
|
8
|
import { MEDIA_TYPE, VIDEO_TYPE } from '../../../base/media';
|
8
|
9
|
import {
|
9
|
10
|
PARTICIPANT_ROLE,
|
|
@@ -55,11 +56,21 @@ type Props = {
|
55
|
56
|
*/
|
56
|
57
|
_isFakeParticipant: boolean,
|
57
|
58
|
|
|
59
|
+ /**
|
|
60
|
+ * Indicates whether multi-stream support is enabled.
|
|
61
|
+ */
|
|
62
|
+ _isMultiStreamSupportEnabled: boolean,
|
|
63
|
+
|
58
|
64
|
/**
|
59
|
65
|
* Indicates whether the participant is screen sharing.
|
60
|
66
|
*/
|
61
|
67
|
_isScreenShare: boolean,
|
62
|
68
|
|
|
69
|
+ /**
|
|
70
|
+ * Indicates whether the thumbnail is for a virtual screenshare participant.
|
|
71
|
+ */
|
|
72
|
+ _isVirtualScreenshare: boolean,
|
|
73
|
+
|
63
|
74
|
/**
|
64
|
75
|
* Indicates whether the participant is local.
|
65
|
76
|
*/
|
|
@@ -187,6 +198,7 @@ class Thumbnail extends PureComponent<Props> {
|
187
|
198
|
const {
|
188
|
199
|
_audioMuted: audioMuted,
|
189
|
200
|
_isScreenShare: isScreenShare,
|
|
201
|
+ _isVirtualScreenshare,
|
190
|
202
|
_isFakeParticipant,
|
191
|
203
|
_renderModeratorIndicator: renderModeratorIndicator,
|
192
|
204
|
_participantId: participantId,
|
|
@@ -203,8 +215,8 @@ class Thumbnail extends PureComponent<Props> {
|
203
|
215
|
styles.thumbnailTopIndicatorContainer,
|
204
|
216
|
styles.thumbnailTopLeftIndicatorContainer
|
205
|
217
|
] }>
|
206
|
|
- <ConnectionIndicator participantId = { participantId } />
|
207
|
|
- <RaisedHandIndicator participantId = { participantId } />
|
|
218
|
+ { !_isVirtualScreenshare && <ConnectionIndicator participantId = { participantId } /> }
|
|
219
|
+ { !_isVirtualScreenshare && <RaisedHandIndicator participantId = { participantId } /> }
|
208
|
220
|
{tileView && isScreenShare && (
|
209
|
221
|
<View style = { styles.indicatorContainer }>
|
210
|
222
|
<ScreenShareIndicator />
|
|
@@ -215,10 +227,10 @@ class Thumbnail extends PureComponent<Props> {
|
215
|
227
|
key = 'bottom-indicators'
|
216
|
228
|
style = { styles.thumbnailIndicatorContainer }>
|
217
|
229
|
<Container style = { (audioMuted || renderModeratorIndicator) && styles.bottomIndicatorsContainer }>
|
218
|
|
- { audioMuted && <AudioMutedIndicator /> }
|
|
230
|
+ { audioMuted && !_isVirtualScreenshare && <AudioMutedIndicator /> }
|
219
|
231
|
{ !tileView && _pinned && <PinnedIndicator />}
|
220
|
|
- { renderModeratorIndicator && <ModeratorIndicator />}
|
221
|
|
- { !tileView && isScreenShare
|
|
232
|
+ { renderModeratorIndicator && !_isVirtualScreenshare && <ModeratorIndicator />}
|
|
233
|
+ { !tileView && (isScreenShare || _isVirtualScreenshare)
|
222
|
234
|
&& <ScreenShareIndicator />
|
223
|
235
|
}
|
224
|
236
|
</Container>
|
|
@@ -242,8 +254,9 @@ class Thumbnail extends PureComponent<Props> {
|
242
|
254
|
render() {
|
243
|
255
|
const {
|
244
|
256
|
_gifSrc,
|
245
|
|
- _isScreenShare: isScreenShare,
|
246
|
257
|
_isFakeParticipant,
|
|
258
|
+ _isScreenShare: isScreenShare,
|
|
259
|
+ _isVirtualScreenshare,
|
247
|
260
|
_participantId: participantId,
|
248
|
261
|
_raisedHand,
|
249
|
262
|
_renderDominantSpeakerIndicator,
|
|
@@ -266,8 +279,8 @@ class Thumbnail extends PureComponent<Props> {
|
266
|
279
|
style = { [
|
267
|
280
|
styles.thumbnail,
|
268
|
281
|
styleOverrides,
|
269
|
|
- _raisedHand ? styles.thumbnailRaisedHand : null,
|
270
|
|
- _renderDominantSpeakerIndicator ? styles.thumbnailDominantSpeaker : null
|
|
282
|
+ _raisedHand && !_isVirtualScreenshare ? styles.thumbnailRaisedHand : null,
|
|
283
|
+ _renderDominantSpeakerIndicator && !_isVirtualScreenshare ? styles.thumbnailDominantSpeaker : null
|
271
|
284
|
] }
|
272
|
285
|
touchFeedback = { false }>
|
273
|
286
|
{_gifSrc ? <Image
|
|
@@ -303,10 +316,9 @@ function _mapStateToProps(state, ownProps) {
|
303
|
316
|
const participant = getParticipantByIdOrUndefined(state, participantID);
|
304
|
317
|
const localParticipantId = getLocalParticipant(state).id;
|
305
|
318
|
const id = participant?.id;
|
306
|
|
- const audioTrack
|
307
|
|
- = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.AUDIO, id);
|
308
|
|
- const videoTrack
|
309
|
|
- = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, id);
|
|
319
|
+ const audioTrack = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.AUDIO, id);
|
|
320
|
+ const videoTrack = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, id);
|
|
321
|
+ const isMultiStreamSupportEnabled = getMultipleVideoSupportFeatureFlag(state);
|
310
|
322
|
const isScreenShare = videoTrack?.videoType === VIDEO_TYPE.DESKTOP;
|
311
|
323
|
const participantCount = getParticipantCount(state);
|
312
|
324
|
const renderDominantSpeakerIndicator = participant && participant.dominantSpeaker && participantCount > 2;
|
|
@@ -320,7 +332,9 @@ function _mapStateToProps(state, ownProps) {
|
320
|
332
|
_audioMuted: audioTrack?.muted ?? true,
|
321
|
333
|
_gifSrc: mode === 'chat' ? null : gifSrc,
|
322
|
334
|
_isFakeParticipant: participant?.isFakeParticipant,
|
|
335
|
+ _isMultiStreamSupportEnabled: isMultiStreamSupportEnabled,
|
323
|
336
|
_isScreenShare: isScreenShare,
|
|
337
|
+ _isVirtualScreenshare: isMultiStreamSupportEnabled && participant?.isVirtualScreenshareParticipant,
|
324
|
338
|
_local: participant?.local,
|
325
|
339
|
_localVideoOwner: Boolean(ownerId === localParticipantId),
|
326
|
340
|
_participantId: id,
|