Просмотр исходного кода

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

tags/v0.0.2
Saúl Ibarra Corretgé 2 лет назад
Родитель
Сommit
7e6fde2700
1 измененных файлов: 8 добавлений и 19 удалений
  1. 8
    19
      modules/connectivity/ConnectionQuality.js

+ 8
- 19
modules/connectivity/ConnectionQuality.js Просмотреть файл

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

Загрузка…
Отмена
Сохранить