Przeglądaj źródła

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

master
Saúl Ibarra Corretgé 5 lat temu
rodzic
commit
67dca97d1d

+ 7
- 2
react/features/base/participants/components/ParticipantView.native.js Wyświetl plik

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

+ 3
- 1
react/features/filmstrip/components/native/Thumbnail.js Wyświetl plik

@@ -6,7 +6,7 @@ import type { Dispatch } from 'redux';
6 6
 
7 7
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
8 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 10
 import {
11 11
     PARTICIPANT_ROLE,
12 12
     ParticipantView,
@@ -141,6 +141,7 @@ class Thumbnail extends Component<Props> {
141 141
         const participantInLargeVideo
142 142
             = participantId === largeVideo.participantId;
143 143
         const videoMuted = !videoTrack || videoTrack.muted;
144
+        const isScreenShare = videoTrack && videoTrack.videoType === VIDEO_TYPE.DESKTOP;
144 145
 
145 146
         return (
146 147
             <Container
@@ -161,6 +162,7 @@ class Thumbnail extends Component<Props> {
161 162
 
162 163
                 <ParticipantView
163 164
                     avatarSize = { AVATAR_SIZE }
165
+                    disableVideo = { isScreenShare }
164 166
                     participantId = { participantId }
165 167
                     style = { _styles.participantViewStyle }
166 168
                     tintEnabled = { participantInLargeVideo && !disableTint }

Ładowanie…
Anuluj
Zapisz