fix(iframe) Keep URL params on iframe reload
Don't cleanup URL params when jitsi is in iframe Fixes an issue where the user right-clicks on the iframe and Reload frame. This causes a refresh of the iframe, not the whole page, but without the parameters (jwt, configOverwrite etc are all lost). The parameters are part of the URL, so by not cleaning them up we make sure that on reload we still have all params
This commit is contained in:
parent
76fc5a0806
commit
afbf261f67
|
@ -187,7 +187,7 @@ export function initAnalytics({ getState }: { getState: Function }, handlers: Ar
|
|||
permanentProperties.externalApi = typeof API_ID === 'number';
|
||||
|
||||
// Report if we are loaded in iframe
|
||||
permanentProperties.inIframe = _inIframe();
|
||||
permanentProperties.inIframe = inIframe();
|
||||
|
||||
// Report the tenant from the URL.
|
||||
permanentProperties.tenant = tenant || '/';
|
||||
|
@ -227,7 +227,7 @@ export function initAnalytics({ getState }: { getState: Function }, handlers: Ar
|
|||
* @returns {boolean} Returns {@code true} if loaded in iframe.
|
||||
* @private
|
||||
*/
|
||||
function _inIframe() {
|
||||
export function inIframe() {
|
||||
if (navigator.product === 'ReactNative') {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import {
|
||||
createConnectionEvent,
|
||||
inIframe,
|
||||
sendAnalytics
|
||||
} from '../analytics';
|
||||
import { SET_ROOM } from '../base/conference';
|
||||
|
@ -53,6 +54,10 @@ function _connectionEstablished(store, next, action) {
|
|||
// determined by when no one needs them anymore.
|
||||
const { history, location } = window;
|
||||
|
||||
if (inIframe()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (history
|
||||
&& location
|
||||
&& history.length
|
||||
|
|
Loading…
Reference in New Issue