Browse Source

rn: polyfill callstats

Instead of bundling it in lib-jitsi-meet, which unnecessarily increases
lib-jitsi-meet's bundle size, polyfill it here so it's available in the global
scope, just like the web does.
master
Saúl Ibarra Corretgé 6 years ago
parent
commit
5afb057387
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      react/features/base/lib-jitsi-meet/native/polyfills-browser.js

+ 6
- 0
react/features/base/lib-jitsi-meet/native/polyfills-browser.js View File

381
 
381
 
382
     // WebRTC
382
     // WebRTC
383
     require('./polyfills-webrtc');
383
     require('./polyfills-webrtc');
384
+
385
+    // CallStats
386
+    //
387
+    // Required by:
388
+    // - lib-jitsi-meet
384
     require('react-native-callstats/csio-polyfill');
389
     require('react-native-callstats/csio-polyfill');
390
+    global.callstats = require('react-native-callstats/callstats');
385
 
391
 
386
     // XMLHttpRequest
392
     // XMLHttpRequest
387
     if (global.XMLHttpRequest) {
393
     if (global.XMLHttpRequest) {

Loading…
Cancel
Save