From 798f5d401ba89c96fd1467afe343a7caba0da5a2 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 11 Apr 2020 15:23:32 +0300 Subject: [PATCH] Ensure active Jitsi conference is closed on widget pop-out Signed-off-by: Pauli Virtanen --- src/components/views/elements/AppTile.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 057643c725..f5664fd613 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -671,6 +671,17 @@ export default class AppTile extends React.Component { } _onPopoutWidgetClick() { + // Ensure Jitsi conferences are closed on pop-out, to not confuse the user to join them + // twice from the same computer, which Jitsi can have problems with (audio echo/gain-loop). + if (WidgetType.JITSI.matches(this.props.app.type) && this.props.show) { + this._endWidgetActions().then(() => { + if (this._appFrame.current) { + // Reload iframe + this._appFrame.current.src = this._getRenderedUrl(); + this.setState({}); + } + }); + } // Using Object.assign workaround as the following opens in a new window instead of a new tab. // window.open(this._getPopoutUrl(), '_blank', 'noopener=yes'); Object.assign(document.createElement('a'),