Saúl Ibarra Corretgé 3 anni fa
parent
commit
49be96799a

+ 1
- 0
android/sdk/build.gradle Vedi File

@@ -71,6 +71,7 @@ dependencies {
71 71
     implementation project(':react-native-default-preference')
72 72
     implementation project(':react-native-immersive')
73 73
     implementation project(':react-native-keep-awake')
74
+    implementation project(':react-native-performance')
74 75
     implementation project(':react-native-slider')
75 76
     implementation project(':react-native-sound')
76 77
     implementation project(':react-native-splash-screen')

+ 1
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Vedi File

@@ -184,6 +184,7 @@ class ReactInstanceManagerHolder {
184 184
                 new com.horcrux.svg.SvgPackage(),
185 185
                 new com.kevinresol.react_native_default_preference.RNDefaultPreferencePackage(),
186 186
                 new com.learnium.RNDeviceInfo.RNDeviceInfo(),
187
+                new com.oblador.performance.PerformancePackage(),
187 188
                 new com.ocetnik.timer.BackgroundTimerPackage(),
188 189
                 new com.reactnativecommunity.asyncstorage.AsyncStoragePackage(),
189 190
                 new com.reactnativecommunity.netinfo.NetInfoPackage(),

+ 2
- 0
android/settings.gradle Vedi File

@@ -21,6 +21,8 @@ include ':react-native-immersive'
21 21
 project(':react-native-immersive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-immersive/android')
22 22
 include ':react-native-keep-awake'
23 23
 project(':react-native-keep-awake').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keep-awake/android')
24
+include ':react-native-performance'
25
+project(':react-native-performance').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-performance/android')
24 26
 include ':react-native-slider'
25 27
 project(':react-native-slider').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/slider/android')
26 28
 include ':react-native-sound'

+ 1
- 0
ios/Podfile Vedi File

@@ -59,6 +59,7 @@ target 'JitsiMeetSDK' do
59 59
   pod 'react-native-calendar-events', :path => '../node_modules/react-native-calendar-events'
60 60
   pod 'react-native-keep-awake', :path => '../node_modules/react-native-keep-awake'
61 61
   pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
62
+  pod 'react-native-performance', :path => '../node_modules/react-native-performance/ios'
62 63
   pod 'react-native-slider', :path => '../node_modules/@react-native-community/slider'
63 64
   pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
64 65
   pod 'react-native-video', :path => '../node_modules/react-native-video/react-native-video.podspec'

+ 7
- 1
ios/Podfile.lock Vedi File

@@ -288,6 +288,8 @@ PODS:
288 288
     - React
289 289
   - react-native-netinfo (4.1.5):
290 290
     - React
291
+  - react-native-performance (2.0.0):
292
+    - React-Core
291 293
   - react-native-slider (3.0.3):
292 294
     - React
293 295
   - react-native-splash-screen (3.2.0):
@@ -402,6 +404,7 @@ DEPENDENCIES:
402 404
   - react-native-calendar-events (from `../node_modules/react-native-calendar-events`)
403 405
   - react-native-keep-awake (from `../node_modules/react-native-keep-awake`)
404 406
   - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
407
+  - react-native-performance (from `../node_modules/react-native-performance/ios`)
405 408
   - "react-native-slider (from `../node_modules/@react-native-community/slider`)"
406 409
   - react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
407 410
   - react-native-video (from `../node_modules/react-native-video/react-native-video.podspec`)
@@ -488,6 +491,8 @@ EXTERNAL SOURCES:
488 491
     :path: "../node_modules/react-native-keep-awake"
489 492
   react-native-netinfo:
490 493
     :path: "../node_modules/@react-native-community/netinfo"
494
+  react-native-performance:
495
+    :path: "../node_modules/react-native-performance/ios"
491 496
   react-native-slider:
492 497
     :path: "../node_modules/@react-native-community/slider"
493 498
   react-native-splash-screen:
@@ -575,6 +580,7 @@ SPEC CHECKSUMS:
575 580
   react-native-calendar-events: 1442fad71a00388f933cfa25512588fec300fcf8
576 581
   react-native-keep-awake: eba3137546b10003361b37c761f6c429b59814ae
577 582
   react-native-netinfo: 8d8db463bcc5db66a8ac5c48a7d86beb3b92f61a
583
+  react-native-performance: 8edfa2bbc9a2af4a02f01d342118e413a95145e0
578 584
   react-native-slider: b733e17fdd31186707146debf1f04b5d94aa1a93
579 585
   react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
580 586
   react-native-video: 1574074179ecaf6a9dd067116c8f31bf9fec15c8
@@ -599,6 +605,6 @@ SPEC CHECKSUMS:
599 605
   RNWatch: a5320c959c75e72845c07985f3e935e58998f1d3
600 606
   Yoga: 96b469c5e81ff51b917b92e8c3390642d4ded30c
601 607
 
602
-PODFILE CHECKSUM: 6f4485ed41286517917d47d2170b0de97d32bbfb
608
+PODFILE CHECKSUM: e830b1b5a46d340e22689b146b55dcf24664c6f1
603 609
 
604 610
 COCOAPODS: 1.10.1

+ 5
- 0
package-lock.json Vedi File

@@ -15075,6 +15075,11 @@
15075 15075
         "react-native-iphone-x-helper": "^1.3.1"
15076 15076
       }
15077 15077
     },
15078
+    "react-native-performance": {
15079
+      "version": "2.0.0",
15080
+      "resolved": "https://registry.npmjs.org/react-native-performance/-/react-native-performance-2.0.0.tgz",
15081
+      "integrity": "sha512-jKM9Qg0SkL9D9ad377nxb1VV+OXJSyYyIrBHKmM6CABNxfrLVA5xkQMEibjmZQde7b0ndJOZoQAiObgJjjc4VQ=="
15082
+    },
15078 15083
     "react-native-sound": {
15079 15084
       "version": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190",
15080 15085
       "from": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190"

+ 1
- 0
package.json Vedi File

@@ -83,6 +83,7 @@
83 83
     "react-native-immersive": "2.0.0",
84 84
     "react-native-keep-awake": "4.0.0",
85 85
     "react-native-paper": "4.8.1",
86
+    "react-native-performance": "2.0.0",
86 87
     "react-native-sound": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190",
87 88
     "react-native-splash-screen": "3.2.0",
88 89
     "react-native-svg": "12.1.0",

+ 19
- 0
react/features/mobile/polyfills/browser.js Vedi File

@@ -383,6 +383,25 @@ function _visitNode(node, callback) {
383 383
     // WebRTC
384 384
     require('./webrtc');
385 385
 
386
+    // Performance API
387
+
388
+    // RN 0.61 does not provide performance.now(), and react-native-performance
389
+    // requires it.
390
+    const now = () => Date.now();
391
+
392
+    if (!global.performance) {
393
+        global.performance = {};
394
+    }
395
+
396
+    if (!global.performance.now) {
397
+        global.performance.now = now;
398
+    }
399
+
400
+    const perf = require('react-native-performance');
401
+
402
+    global.performance = perf;
403
+    global.PerformanceObserver = perf.PerformanceObserver;
404
+
386 405
     // CallStats
387 406
     //
388 407
     // Required by:

Loading…
Annulla
Salva