From f7a526f4883fd15ef2a978c801f105b73f803f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 11 Oct 2019 15:33:07 +0200 Subject: [PATCH] rn: fix rendering unnecessary stuff when in PiP mode --- .../components/native/Conference.js | 231 ++++++++++-------- 1 file changed, 134 insertions(+), 97 deletions(-) diff --git a/react/features/conference/components/native/Conference.js b/react/features/conference/components/native/Conference.js index 9efccc3af..9b6050f41 100644 --- a/react/features/conference/components/native/Conference.js +++ b/react/features/conference/components/native/Conference.js @@ -162,108 +162,13 @@ class Conference extends AbstractConference { * @returns {ReactElement} */ render() { - const { - _connecting, - _filmstripVisible, - _largeVideoParticipantId, - _reducedUI, - _shouldDisplayTileView, - _toolboxVisible - } = this.props; - const showGradient = _toolboxVisible; - const applyGradientStretching = _filmstripVisible && isNarrowAspectRatio(this) && !_shouldDisplayTileView; - return ( ); } @@ -322,6 +227,138 @@ class Conference extends AbstractConference { : undefined); } + /** + * Renders the content for the Conference container. + * + * @private + * @returns {React$Element} + */ + _renderContent() { + const { + _connecting, + _filmstripVisible, + _largeVideoParticipantId, + _reducedUI, + _shouldDisplayTileView, + _toolboxVisible + } = this.props; + const showGradient = _toolboxVisible; + const applyGradientStretching = _filmstripVisible && isNarrowAspectRatio(this) && !_shouldDisplayTileView; + + if (_reducedUI) { + return this._renderContentForReducedUi(); + } + + return ( + <> + + + + + {/* + * The LargeVideo is the lowermost stacking layer. + */ + _shouldDisplayTileView + ? + : + } + + {/* + * If there is a ringing call, show the callee's info. + */ + + } + + {/* + * The activity/loading indicator goes above everything, except + * the toolbox/toolbars and the dialogs. + */ + _connecting + && + + + } + + + + { showGradient && } + + + + + + { _shouldDisplayTileView || } + + {/* + * The Toolbox is in a stacking layer below the Filmstrip. + */} + + + {/* + * The Filmstrip is in a stacking layer above the + * LargeVideo. The LargeVideo and the Filmstrip form what + * the Web/React app calls "videospace". Presumably, the + * name and grouping stem from the fact that these two + * React Components depict the videos of the conference's + * participants. + */ + _shouldDisplayTileView ? undefined : + } + + + + + { this._renderNotificationsContainer() } + + + + + { this._renderConferenceNotification() } + + ); + } + + /** + * Renders the content for the Conference container when in "reduced UI" mode. + * + * @private + * @returns {React$Element} + */ + _renderContentForReducedUi() { + const { _connecting } = this.props; + + return ( + <> + + + { + _connecting + && + + + } + + ); + } + /** * Renders a container for notifications to be displayed by the * base/notifications feature. @@ -329,7 +366,7 @@ class Conference extends AbstractConference { * @private * @returns {React$Element} */ - renderNotificationsContainer() { + _renderNotificationsContainer() { const notificationsStyle = {}; // In the landscape mode (wide) there's problem with notifications being