浏览代码

fix(rn, screen-sharing) don't render own screen-share in large view

master
Saúl Ibarra Corretgé 5 年前
父节点
当前提交
4211db0893
共有 1 个文件被更改,包括 18 次插入2 次删除
  1. 18
    2
      react/features/large-video/components/LargeVideo.native.js

+ 18
- 2
react/features/large-video/components/LargeVideo.native.js 查看文件

3
 import React, { PureComponent } from 'react';
3
 import React, { PureComponent } from 'react';
4
 
4
 
5
 import { ColorSchemeRegistry } from '../../base/color-scheme';
5
 import { ColorSchemeRegistry } from '../../base/color-scheme';
6
-import { ParticipantView } from '../../base/participants';
6
+import { ParticipantView, getParticipantById } from '../../base/participants';
7
 import { connect } from '../../base/redux';
7
 import { connect } from '../../base/redux';
8
 import { StyleType } from '../../base/styles';
8
 import { StyleType } from '../../base/styles';
9
+import { isLocalVideoTrackDesktop } from '../../base/tracks/functions';
9
 
10
 
10
 import { AVATAR_SIZE } from './styles';
11
 import { AVATAR_SIZE } from './styles';
11
 
12
 
14
  */
15
  */
15
 type Props = {
16
 type Props = {
16
 
17
 
18
+    /**
19
+     * Whether video should be disabled.
20
+     */
21
+    _disableVideo: boolean,
22
+
17
     /**
23
     /**
18
      * Application's viewport height.
24
      * Application's viewport height.
19
      */
25
      */
112
             useConnectivityInfoLabel
118
             useConnectivityInfoLabel
113
         } = this.state;
119
         } = this.state;
114
         const {
120
         const {
121
+            _disableVideo,
115
             _participantId,
122
             _participantId,
116
             _styles,
123
             _styles,
117
             onClick
124
             onClick
120
         return (
127
         return (
121
             <ParticipantView
128
             <ParticipantView
122
                 avatarSize = { avatarSize }
129
                 avatarSize = { avatarSize }
130
+                disableVideo = { _disableVideo }
123
                 onPress = { onClick }
131
                 onPress = { onClick }
124
                 participantId = { _participantId }
132
                 participantId = { _participantId }
125
                 style = { _styles.largeVideo }
133
                 style = { _styles.largeVideo }
139
  * @returns {Props}
147
  * @returns {Props}
140
  */
148
  */
141
 function _mapStateToProps(state) {
149
 function _mapStateToProps(state) {
150
+    const { participantId } = state['features/large-video'];
151
+    const participant = getParticipantById(state, participantId);
142
     const { clientHeight: height, clientWidth: width } = state['features/base/responsive-ui'];
152
     const { clientHeight: height, clientWidth: width } = state['features/base/responsive-ui'];
153
+    let disableVideo = false;
154
+
155
+    if (participant?.local) {
156
+        disableVideo = isLocalVideoTrackDesktop(state);
157
+    }
143
 
158
 
144
     return {
159
     return {
160
+        _disableVideo: disableVideo,
145
         _height: height,
161
         _height: height,
146
-        _participantId: state['features/large-video'].participantId,
162
+        _participantId: participantId,
147
         _styles: ColorSchemeRegistry.get(state, 'LargeVideo'),
163
         _styles: ColorSchemeRegistry.get(state, 'LargeVideo'),
148
         _width: width
164
         _width: width
149
     };
165
     };

正在加载...
取消
保存