瀏覽代碼

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

master
Tudor-Ovidiu Avram 4 年之前
父節點
當前提交
e4c1046d7c
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 0
    1
      index.html
  2. 8
    0
      react/index.web.js

+ 0
- 1
index.html 查看文件

161
     <script><!--#include virtual="/logging_config.js" --></script>
161
     <script><!--#include virtual="/logging_config.js" --></script>
162
     <script src="libs/lib-jitsi-meet.min.js?v=139"></script>
162
     <script src="libs/lib-jitsi-meet.min.js?v=139"></script>
163
     <script src="libs/app.bundle.min.js?v=139"></script>
163
     <script src="libs/app.bundle.min.js?v=139"></script>
164
-    <script src="static/pwa/registrator.js" async></script>
165
     <!--#include virtual="title.html" -->
164
     <!--#include virtual="title.html" -->
166
     <!--#include virtual="plugin.head.html" -->
165
     <!--#include virtual="plugin.head.html" -->
167
     <!--#include virtual="static/welcomePageAdditionalContent.html" -->
166
     <!--#include virtual="static/welcomePageAdditionalContent.html" -->

+ 8
- 0
react/index.web.js 查看文件

6
 import { getJitsiMeetTransport } from '../modules/transport';
6
 import { getJitsiMeetTransport } from '../modules/transport';
7
 
7
 
8
 import { App } from './features/app/components';
8
 import { App } from './features/app/components';
9
+import { browser } from './features/base/lib-jitsi-meet';
9
 import { getLogger } from './features/base/logging/functions';
10
 import { getLogger } from './features/base/logging/functions';
10
 import { Platform } from './features/base/react';
11
 import { Platform } from './features/base/react';
11
 import { getJitsiMeetGlobalNS } from './features/base/util';
12
 import { getJitsiMeetGlobalNS } from './features/base/util';
13
+import { loadScript } from './features/base/util/loadScript';
12
 import PrejoinApp from './features/prejoin/components/PrejoinApp';
14
 import PrejoinApp from './features/prejoin/components/PrejoinApp';
13
 
15
 
14
 const logger = getLogger('index.web');
16
 const logger = getLogger('index.web');
22
 
24
 
23
     APP.connectionTimes['document.ready'] = now;
25
     APP.connectionTimes['document.ready'] = now;
24
     logger.log('(TIME) document ready:\t', now);
26
     logger.log('(TIME) document ready:\t', now);
27
+
28
+    if (!browser.isElectron()) {
29
+        const base = window.location.origin;
30
+
31
+        loadScript(`${base}/static/pwa/registrator.js`);
32
+    }
25
 });
33
 });
26
 
34
 
27
 // Workaround for the issue when returning to a page with the back button and
35
 // Workaround for the issue when returning to a page with the back button and

Loading…
取消
儲存