Browse Source

rn,participants: don't render thumbnnail for screen-shares

master
Saúl Ibarra Corretgé 6 years ago
parent
commit
67dca97d1d

+ 7
- 2
react/features/base/participants/components/ParticipantView.native.js View File

55
      */
55
      */
56
     avatarSize: number,
56
     avatarSize: number,
57
 
57
 
58
+    /**
59
+     * Whether video should be disabled for his view.
60
+     */
61
+    disableVideo: ?boolean,
62
+
58
     /**
63
     /**
59
      * Callback to invoke when the {@code ParticipantView} is clicked/pressed.
64
      * Callback to invoke when the {@code ParticipantView} is clicked/pressed.
60
      */
65
      */
250
  * @returns {Props}
255
  * @returns {Props}
251
  */
256
  */
252
 function _mapStateToProps(state, ownProps) {
257
 function _mapStateToProps(state, ownProps) {
253
-    const { participantId } = ownProps;
258
+    const { disableVideo, participantId } = ownProps;
254
     let connectionStatus;
259
     let connectionStatus;
255
     let participantName;
260
     let participantName;
256
 
261
 
259
             connectionStatus
264
             connectionStatus
260
                 || JitsiParticipantConnectionStatus.ACTIVE,
265
                 || JitsiParticipantConnectionStatus.ACTIVE,
261
         _participantName: participantName,
266
         _participantName: participantName,
262
-        _renderVideo: shouldRenderParticipantVideo(state, participantId),
267
+        _renderVideo: shouldRenderParticipantVideo(state, participantId) && !disableVideo,
263
         _videoTrack:
268
         _videoTrack:
264
             getTrackByMediaTypeAndParticipant(
269
             getTrackByMediaTypeAndParticipant(
265
                 state['features/base/tracks'],
270
                 state['features/base/tracks'],

+ 3
- 1
react/features/filmstrip/components/native/Thumbnail.js View File

6
 
6
 
7
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
8
 import { openDialog } from '../../../base/dialog';
8
 import { openDialog } from '../../../base/dialog';
9
-import { Audio, MEDIA_TYPE } from '../../../base/media';
9
+import { MEDIA_TYPE, VIDEO_TYPE, Audio } from '../../../base/media';
10
 import {
10
 import {
11
     PARTICIPANT_ROLE,
11
     PARTICIPANT_ROLE,
12
     ParticipantView,
12
     ParticipantView,
141
         const participantInLargeVideo
141
         const participantInLargeVideo
142
             = participantId === largeVideo.participantId;
142
             = participantId === largeVideo.participantId;
143
         const videoMuted = !videoTrack || videoTrack.muted;
143
         const videoMuted = !videoTrack || videoTrack.muted;
144
+        const isScreenShare = videoTrack && videoTrack.videoType === VIDEO_TYPE.DESKTOP;
144
 
145
 
145
         return (
146
         return (
146
             <Container
147
             <Container
161
 
162
 
162
                 <ParticipantView
163
                 <ParticipantView
163
                     avatarSize = { AVATAR_SIZE }
164
                     avatarSize = { AVATAR_SIZE }
165
+                    disableVideo = { isScreenShare }
164
                     participantId = { participantId }
166
                     participantId = { participantId }
165
                     style = { _styles.participantViewStyle }
167
                     style = { _styles.participantViewStyle }
166
                     tintEnabled = { participantInLargeVideo && !disableTint }
168
                     tintEnabled = { participantInLargeVideo && !disableTint }

Loading…
Cancel
Save