Переглянути джерело

[RN] Add support for callstats on mobile

The global.performance.now polyfill is removed since it's polyfilled by
react-native-callstats.
j8
Saúl Ibarra Corretgé 8 роки тому
джерело
коміт
8eebfcad72

+ 1
- 0
package.json Переглянути файл

@@ -56,6 +56,7 @@
56 56
     "react-i18next": "4.8.0",
57 57
     "react-native": "0.42.3",
58 58
     "react-native-background-timer": "1.2.0",
59
+    "react-native-callstats": "3.23.0",
59 60
     "react-native-fetch-blob": "0.10.8",
60 61
     "react-native-img-cache": "1.4.0",
61 62
     "react-native-immersive": "1.0.0",

+ 0
- 8
react/features/base/config/reducer.js Переглянути файл

@@ -37,14 +37,6 @@ const INITIAL_RN_STATE = {
37 37
     // fastest to merely disable them.
38 38
     disableAudioLevels: true,
39 39
 
40
-    // FIXME Lib-jitsi-meet uses HTML script elements to asynchronously load
41
-    // certain pieces of JavaScript. Unfortunately, the technique doesn't work
42
-    // on React Native (because there are no HTML elements in the first place).
43
-    // Fortunately, these pieces of JavaScript currently involve third parties
44
-    // and we can temporarily disable them (until we implement an alternative to
45
-    // async script elements on React Native).
46
-    disableThirdPartyRequests: true,
47
-
48 40
     p2p: {
49 41
         preferH264: true
50 42
     }

+ 1
- 9
react/features/base/lib-jitsi-meet/native/polyfills-browser.js Переглянути файл

@@ -313,15 +313,6 @@ function _visitNode(node, callback) {
313 313
         })();
314 314
     }
315 315
 
316
-    // performance
317
-    if (typeof global.performance === 'undefined') {
318
-        global.performance = {
319
-            now() {
320
-                return 0;
321
-            }
322
-        };
323
-    }
324
-
325 316
     // sessionStorage
326 317
     //
327 318
     // Required by:
@@ -339,6 +330,7 @@ function _visitNode(node, callback) {
339 330
 
340 331
     // WebRTC
341 332
     require('./polyfills-webrtc');
333
+    require('react-native-callstats/csio-polyfill');
342 334
 
343 335
     // XMLHttpRequest
344 336
     if (global.XMLHttpRequest) {

Завантаження…
Відмінити
Зберегти