Pārlūkot izejas kodu

fix(rn,ConnectionQuality) use new APIs for target bitrate on RN

tags/v0.0.2
Saúl Ibarra Corretgé 2 gadus atpakaļ
vecāks
revīzija
7e6fde2700
1 mainītis faili ar 8 papildinājumiem un 19 dzēšanām
  1. 8
    19
      modules/connectivity/ConnectionQuality.js

+ 8
- 19
modules/connectivity/ConnectionQuality.js Parādīt failu

@@ -4,7 +4,6 @@ import * as ConferenceEvents from '../../JitsiConferenceEvents';
4 4
 import CodecMimeType from '../../service/RTC/CodecMimeType';
5 5
 import * as RTCEvents from '../../service/RTC/RTCEvents';
6 6
 import * as ConnectionQualityEvents from '../../service/connectivity/ConnectionQualityEvents';
7
-import browser from '../browser';
8 7
 
9 8
 const Resolutions = require('../../service/RTC/Resolutions');
10 9
 const { VideoType } = require('../../service/RTC/VideoType');
@@ -22,33 +21,27 @@ const kSimulcastFormats = [
22 21
     { width: 1920,
23 22
         height: 1080,
24 23
         layers: 3,
25
-        target: 'high',
26
-        targetRN: 4000000 },
24
+        target: 'high' },
27 25
     { width: 1280,
28 26
         height: 720,
29 27
         layers: 3,
30
-        target: 'high',
31
-        targetRN: 2500000 },
28
+        target: 'high' },
32 29
     { width: 960,
33 30
         height: 540,
34 31
         layers: 3,
35
-        target: 'standard',
36
-        targetRN: 900000 },
32
+        target: 'standard' },
37 33
     { width: 640,
38 34
         height: 360,
39 35
         layers: 2,
40
-        target: 'standard',
41
-        targetRN: 500000 },
36
+        target: 'standard' },
42 37
     { width: 480,
43 38
         height: 270,
44 39
         layers: 2,
45
-        target: 'low',
46
-        targetRN: 350000 },
40
+        target: 'low' },
47 41
     { width: 320,
48 42
         height: 180,
49 43
         layers: 1,
50
-        target: 'low',
51
-        targetRN: 150000 }
44
+        target: 'low' }
52 45
 ];
53 46
 
54 47
 /**
@@ -85,9 +78,7 @@ function getTarget(simulcast, resolution, millisSinceStart, videoQualitySettings
85 78
 
86 79
             simulcastFormat = kSimulcastFormats.find(f => f.height === targetHeight);
87 80
             if (simulcastFormat) {
88
-                target += browser.isReactNative()
89
-                    ? simulcastFormat.targetRN
90
-                    : videoQualitySettings[simulcastFormat.target];
81
+                target += videoQualitySettings[simulcastFormat.target];
91 82
             } else {
92 83
                 break;
93 84
             }
@@ -95,9 +86,7 @@ function getTarget(simulcast, resolution, millisSinceStart, videoQualitySettings
95 86
     } else if (simulcastFormat) {
96 87
         // For VP9 SVC, H.264 (simulcast automatically disabled) and p2p, target bitrate will be
97 88
         // same as that of the individual stream bitrate.
98
-        target = browser.isReactNative()
99
-            ? simulcastFormat.targetRN
100
-            : videoQualitySettings[simulcastFormat.target];
89
+        target = videoQualitySettings[simulcastFormat.target];
101 90
     }
102 91
 
103 92
     // Allow for an additional 1 second for ramp up -- delay any initial drop

Notiek ielāde…
Atcelt
Saglabāt