|
|
@@ -52,7 +52,7 @@ type Props = {
|
|
52
|
52
|
_isFakeParticipant: boolean,
|
|
53
|
53
|
|
|
54
|
54
|
/**
|
|
55
|
|
- * Indicates whether the participant is fake.
|
|
|
55
|
+ * Indicates whether the participant is screen sharing.
|
|
56
|
56
|
*/
|
|
57
|
57
|
_isScreenShare: boolean,
|
|
58
|
58
|
|
|
|
@@ -200,12 +200,11 @@ class Thumbnail extends PureComponent<Props> {
|
|
200
|
200
|
}
|
|
201
|
201
|
|
|
202
|
202
|
/**
|
|
203
|
|
- * Implements React's {@link Component#render()}.
|
|
|
203
|
+ * Renders the indicators for the thumbnail.
|
|
204
|
204
|
*
|
|
205
|
|
- * @inheritdoc
|
|
206
|
205
|
* @returns {ReactElement}
|
|
207
|
206
|
*/
|
|
208
|
|
- render() {
|
|
|
207
|
+ _renderIndicators() {
|
|
209
|
208
|
const {
|
|
210
|
209
|
_audioMuted: audioMuted,
|
|
211
|
210
|
_isScreenShare: isScreenShare,
|
|
|
@@ -213,10 +212,56 @@ class Thumbnail extends PureComponent<Props> {
|
|
213
|
212
|
_renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
|
|
214
|
213
|
_renderModeratorIndicator: renderModeratorIndicator,
|
|
215
|
214
|
_participantId: participantId,
|
|
|
215
|
+ _videoMuted: videoMuted
|
|
|
216
|
+ } = this.props;
|
|
|
217
|
+ const indicators = [];
|
|
|
218
|
+
|
|
|
219
|
+ if (renderModeratorIndicator) {
|
|
|
220
|
+ indicators.push(<View style = { styles.moderatorIndicatorContainer }>
|
|
|
221
|
+ <ModeratorIndicator />
|
|
|
222
|
+ </View>);
|
|
|
223
|
+ }
|
|
|
224
|
+
|
|
|
225
|
+ if (!_isFakeParticipant) {
|
|
|
226
|
+ indicators.push(<View
|
|
|
227
|
+ style = { [
|
|
|
228
|
+ styles.thumbnailTopIndicatorContainer,
|
|
|
229
|
+ styles.thumbnailTopLeftIndicatorContainer
|
|
|
230
|
+ ] }>
|
|
|
231
|
+ <RaisedHandIndicator participantId = { participantId } />
|
|
|
232
|
+ { renderDominantSpeakerIndicator && <DominantSpeakerIndicator /> }
|
|
|
233
|
+ </View>);
|
|
|
234
|
+ indicators.push(<View
|
|
|
235
|
+ style = { [
|
|
|
236
|
+ styles.thumbnailTopIndicatorContainer,
|
|
|
237
|
+ styles.thumbnailTopRightIndicatorContainer
|
|
|
238
|
+ ] }>
|
|
|
239
|
+ <ConnectionIndicator participantId = { participantId } />
|
|
|
240
|
+ </View>);
|
|
|
241
|
+ indicators.push(<Container style = { styles.thumbnailIndicatorContainer }>
|
|
|
242
|
+ { audioMuted && <AudioMutedIndicator /> }
|
|
|
243
|
+ { videoMuted && <VideoMutedIndicator /> }
|
|
|
244
|
+ { isScreenShare && <ScreenShareIndicator /> }
|
|
|
245
|
+ </Container>);
|
|
|
246
|
+ }
|
|
|
247
|
+
|
|
|
248
|
+ return indicators;
|
|
|
249
|
+ }
|
|
|
250
|
+
|
|
|
251
|
+ /**
|
|
|
252
|
+ * Implements React's {@link Component#render()}.
|
|
|
253
|
+ *
|
|
|
254
|
+ * @inheritdoc
|
|
|
255
|
+ * @returns {ReactElement}
|
|
|
256
|
+ */
|
|
|
257
|
+ render() {
|
|
|
258
|
+ const {
|
|
|
259
|
+ _isScreenShare: isScreenShare,
|
|
|
260
|
+ _isFakeParticipant,
|
|
|
261
|
+ _participantId: participantId,
|
|
216
|
262
|
_participantInLargeVideo: participantInLargeVideo,
|
|
217
|
263
|
_pinned,
|
|
218
|
264
|
_styles,
|
|
219
|
|
- _videoMuted: videoMuted,
|
|
220
|
265
|
disableTint,
|
|
221
|
266
|
height,
|
|
222
|
267
|
renderDisplayName,
|
|
|
@@ -255,39 +300,8 @@ class Thumbnail extends PureComponent<Props> {
|
|
255
|
300
|
<DisplayNameLabel participantId = { participantId } />
|
|
256
|
301
|
</Container>
|
|
257
|
302
|
}
|
|
258
|
|
- { renderModeratorIndicator
|
|
259
|
|
- && <View style = { styles.moderatorIndicatorContainer }>
|
|
260
|
|
- <ModeratorIndicator />
|
|
261
|
|
- </View>
|
|
262
|
|
- }
|
|
263
|
|
- {
|
|
264
|
|
- !_isFakeParticipant
|
|
265
|
|
- && <View
|
|
266
|
|
- style = { [
|
|
267
|
|
- styles.thumbnailTopIndicatorContainer,
|
|
268
|
|
- styles.thumbnailTopLeftIndicatorContainer
|
|
269
|
|
- ] }>
|
|
270
|
|
- <RaisedHandIndicator participantId = { participantId } />
|
|
271
|
|
- { renderDominantSpeakerIndicator && <DominantSpeakerIndicator /> }
|
|
272
|
|
- </View>
|
|
273
|
|
- }
|
|
274
|
303
|
{
|
|
275
|
|
- !_isFakeParticipant
|
|
276
|
|
- && <View
|
|
277
|
|
- style = { [
|
|
278
|
|
- styles.thumbnailTopIndicatorContainer,
|
|
279
|
|
- styles.thumbnailTopRightIndicatorContainer
|
|
280
|
|
- ] }>
|
|
281
|
|
- <ConnectionIndicator participantId = { participantId } />
|
|
282
|
|
- </View>
|
|
283
|
|
- }
|
|
284
|
|
- {
|
|
285
|
|
- !_isFakeParticipant
|
|
286
|
|
- && <Container style = { styles.thumbnailIndicatorContainer }>
|
|
287
|
|
- { audioMuted && <AudioMutedIndicator /> }
|
|
288
|
|
- { videoMuted && <VideoMutedIndicator /> }
|
|
289
|
|
- { isScreenShare && <ScreenShareIndicator /> }
|
|
290
|
|
- </Container>
|
|
|
304
|
+ this._renderIndicators()
|
|
291
|
305
|
}
|
|
292
|
306
|
</Container>
|
|
293
|
307
|
);
|