fix(pwa) bypass loading in electron. ensure same origin with registrator

This commit is contained in:
Tudor-Ovidiu Avram 2020-10-15 18:25:58 +03:00 committed by Saúl Ibarra Corretgé
parent 223187c640
commit e4c1046d7c
2 changed files with 8 additions and 1 deletions

View File

@ -161,7 +161,6 @@
<script><!--#include virtual="/logging_config.js" --></script>
<script src="libs/lib-jitsi-meet.min.js?v=139"></script>
<script src="libs/app.bundle.min.js?v=139"></script>
<script src="static/pwa/registrator.js" async></script>
<!--#include virtual="title.html" -->
<!--#include virtual="plugin.head.html" -->
<!--#include virtual="static/welcomePageAdditionalContent.html" -->

View File

@ -6,9 +6,11 @@ import ReactDOM from 'react-dom';
import { getJitsiMeetTransport } from '../modules/transport';
import { App } from './features/app/components';
import { browser } from './features/base/lib-jitsi-meet';
import { getLogger } from './features/base/logging/functions';
import { Platform } from './features/base/react';
import { getJitsiMeetGlobalNS } from './features/base/util';
import { loadScript } from './features/base/util/loadScript';
import PrejoinApp from './features/prejoin/components/PrejoinApp';
const logger = getLogger('index.web');
@ -22,6 +24,12 @@ document.addEventListener('DOMContentLoaded', () => {
APP.connectionTimes['document.ready'] = now;
logger.log('(TIME) document ready:\t', now);
if (!browser.isElectron()) {
const base = window.location.origin;
loadScript(`${base}/static/pwa/registrator.js`);
}
});
// Workaround for the issue when returning to a page with the back button and