Quellcode durchsuchen

Re-order resolution preference, so that we always preference 16:9 ratio when we fallback.

master
yanas vor 9 Jahren
Ursprung
Commit
39ed8800c4
3 geänderte Dateien mit 18 neuen und 12 gelöschten Zeilen
  1. 3
    0
      JitsiMeetJS.js
  2. 3
    2
      modules/RTC/RTCUtils.js
  3. 12
    10
      service/RTC/Resolutions.js

+ 3
- 0
JitsiMeetJS.js Datei anzeigen

1
+var logger = require("jitsi-meet-logger").getLogger(__filename);
1
 var JitsiConnection = require("./JitsiConnection");
2
 var JitsiConnection = require("./JitsiConnection");
2
 var JitsiConferenceEvents = require("./JitsiConferenceEvents");
3
 var JitsiConferenceEvents = require("./JitsiConferenceEvents");
3
 var JitsiConnectionEvents = require("./JitsiConnectionEvents");
4
 var JitsiConnectionEvents = require("./JitsiConnectionEvents");
110
                     if(newResolution === null)
111
                     if(newResolution === null)
111
                         return Promise.reject(error);
112
                         return Promise.reject(error);
112
                     options.resolution = newResolution;
113
                     options.resolution = newResolution;
114
+                    logger.debug("Retry createLocalTracks with resolution",
115
+                                newResolution);
113
                     return LibJitsiMeet.createLocalTracks(options);
116
                     return LibJitsiMeet.createLocalTracks(options);
114
                 }
117
                 }
115
                 return Promise.reject(error);
118
                 return Promise.reject(error);

+ 3
- 2
modules/RTC/RTCUtils.js Datei anzeigen

35
         // FIXME can't remember if the purpose of this was to always request
35
         // FIXME can't remember if the purpose of this was to always request
36
         //       low resolution on Android ? if yes it should be moved up front
36
         //       low resolution on Android ? if yes it should be moved up front
37
         constraints.video.mandatory.minWidth = 320;
37
         constraints.video.mandatory.minWidth = 320;
38
-        constraints.video.mandatory.minHeight = 240;
38
+        constraints.video.mandatory.minHeight = 180;
39
         constraints.video.mandatory.maxFrameRate = 15;
39
         constraints.video.mandatory.maxFrameRate = 15;
40
     }
40
     }
41
 
41
 
778
      * @returns {boolean} true if available, false otherwise.
778
      * @returns {boolean} true if available, false otherwise.
779
      */
779
      */
780
     isDeviceListAvailable: function () {
780
     isDeviceListAvailable: function () {
781
-        var isEnumerateDevicesAvailable = navigator.mediaDevices && navigator.mediaDevices.enumerateDevices;
781
+        var isEnumerateDevicesAvailable
782
+            = navigator.mediaDevices && navigator.mediaDevices.enumerateDevices;
782
         if (isEnumerateDevicesAvailable) {
783
         if (isEnumerateDevicesAvailable) {
783
             return true;
784
             return true;
784
         }
785
         }

+ 12
- 10
service/RTC/Resolutions.js Datei anzeigen

24
         height: 720,
24
         height: 720,
25
         order: 5
25
         order: 5
26
     },
26
     },
27
-    "640": {
27
+    // 16:9 resolution first.
28
+    "360": {
28
         width: 640,
29
         width: 640,
29
-        height: 480,
30
+        height: 360,
30
         order: 4
31
         order: 4
31
     },
32
     },
32
-    "vga": {
33
+    "640": {
33
         width: 640,
34
         width: 640,
34
         height: 480,
35
         height: 480,
35
-        order: 4
36
+        order: 3
36
     },
37
     },
37
-    "360": {
38
+    "vga": {
38
         width: 640,
39
         width: 640,
39
-        height: 360,
40
+        height: 480,
40
         order: 3
41
         order: 3
41
     },
42
     },
42
-    "320": {
43
+    // 16:9 resolution first.
44
+    "180": {
43
         width: 320,
45
         width: 320,
44
-        height: 240,
46
+        height: 180,
45
         order: 2
47
         order: 2
46
     },
48
     },
47
-    "180": {
49
+    "320": {
48
         width: 320,
50
         width: 320,
49
-        height: 180,
51
+        height: 240,
50
         order: 1
52
         order: 1
51
     }
53
     }
52
 };
54
 };

Laden…
Abbrechen
Speichern