Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Tudor-Ovidiu Avrame4c1046d7c1c
diff --git a/index.html b/index.html
index 941a0a8222..fa366474bd 100644
--- a/index.html
+++ b/index.html
@@ -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" -->
diff --git a/react/index.web.js b/react/index.web.js
index c187f6e49a..8bae969604 100644
--- a/react/index.web.js
+++ b/react/index.web.js
@@ -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