From 4211db0893bdd3e460a142b61d95eec88a05d9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 4 Nov 2020 14:13:32 +0100 Subject: [PATCH] fix(rn, screen-sharing) don't render own screen-share in large view --- .../components/LargeVideo.native.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/react/features/large-video/components/LargeVideo.native.js b/react/features/large-video/components/LargeVideo.native.js index 5377089b9..38b51bf78 100644 --- a/react/features/large-video/components/LargeVideo.native.js +++ b/react/features/large-video/components/LargeVideo.native.js @@ -3,9 +3,10 @@ import React, { PureComponent } from 'react'; import { ColorSchemeRegistry } from '../../base/color-scheme'; -import { ParticipantView } from '../../base/participants'; +import { ParticipantView, getParticipantById } from '../../base/participants'; import { connect } from '../../base/redux'; import { StyleType } from '../../base/styles'; +import { isLocalVideoTrackDesktop } from '../../base/tracks/functions'; import { AVATAR_SIZE } from './styles'; @@ -14,6 +15,11 @@ import { AVATAR_SIZE } from './styles'; */ type Props = { + /** + * Whether video should be disabled. + */ + _disableVideo: boolean, + /** * Application's viewport height. */ @@ -112,6 +118,7 @@ class LargeVideo extends PureComponent { useConnectivityInfoLabel } = this.state; const { + _disableVideo, _participantId, _styles, onClick @@ -120,6 +127,7 @@ class LargeVideo extends PureComponent { return ( { * @returns {Props} */ function _mapStateToProps(state) { + const { participantId } = state['features/large-video']; + const participant = getParticipantById(state, participantId); const { clientHeight: height, clientWidth: width } = state['features/base/responsive-ui']; + let disableVideo = false; + + if (participant?.local) { + disableVideo = isLocalVideoTrackDesktop(state); + } return { + _disableVideo: disableVideo, _height: height, - _participantId: state['features/large-video'].participantId, + _participantId: participantId, _styles: ColorSchemeRegistry.get(state, 'LargeVideo'), _width: width };