Ver código fonte

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

master
yanas 9 anos atrás
pai
commit
39ed8800c4
3 arquivos alterados com 18 adições e 12 exclusões
  1. 3
    0
      JitsiMeetJS.js
  2. 3
    2
      modules/RTC/RTCUtils.js
  3. 12
    10
      service/RTC/Resolutions.js

+ 3
- 0
JitsiMeetJS.js Ver arquivo

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

+ 3
- 2
modules/RTC/RTCUtils.js Ver arquivo

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

+ 12
- 10
service/RTC/Resolutions.js Ver arquivo

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

Carregando…
Cancelar
Salvar