Quellcode durchsuchen

Fixes audio-only (when GUM fails)

master
Zalmoxisus vor 10 Jahren
Ursprung
Commit
40de181959

+ 3
- 1
libs/modules/RTC.bundle.js Datei anzeigen

@@ -700,7 +700,9 @@ function getConstraints(um, resolution, bandwidth, fps, desktopStream, isAndroid
700 700
         }
701 701
     }
702 702
 
703
-    setResolutionConstraints(constraints, resolution, isAndroid);
703
+    if (um.indexOf('video') >= 0) {
704
+        setResolutionConstraints(constraints, resolution, isAndroid);
705
+    }
704 706
 
705 707
     if (bandwidth) { // doesn't work currently, see webrtc issue 1846
706 708
         if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true

+ 6
- 4
libs/modules/simulcast.bundle.js Datei anzeigen

@@ -380,10 +380,12 @@ NativeSimulcastSender.prototype._appendSimulcastGroup = function (lines) {
380 380
         simSSRC = this._generateRandomSSRC();
381 381
         ssrcGroup.push(simSSRC);
382 382
 
383
-        sb.splice.apply(sb, [sb.length, 0].concat(
384
-            [["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''),
385
-                ["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')]
386
-        ));
383
+        if (videoSources.base) {
384
+            sb.splice.apply(sb, [sb.length, 0].concat(
385
+                [["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''),
386
+                    ["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')]
387
+            ));
388
+        }
387 389
 
388 390
         this.logger.info(['Generated substream ', i, ' with SSRC ', simSSRC, '.'].join(''));
389 391
 

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

@@ -115,7 +115,9 @@ function getConstraints(um, resolution, bandwidth, fps, desktopStream, isAndroid
115 115
         }
116 116
     }
117 117
 
118
-    setResolutionConstraints(constraints, resolution, isAndroid);
118
+    if (um.indexOf('video') >= 0) {
119
+        setResolutionConstraints(constraints, resolution, isAndroid);
120
+    }
119 121
 
120 122
     if (bandwidth) { // doesn't work currently, see webrtc issue 1846
121 123
         if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true

+ 6
- 4
modules/simulcast/SimulcastSender.js Datei anzeigen

@@ -78,10 +78,12 @@ NativeSimulcastSender.prototype._appendSimulcastGroup = function (lines) {
78 78
         simSSRC = this._generateRandomSSRC();
79 79
         ssrcGroup.push(simSSRC);
80 80
 
81
-        sb.splice.apply(sb, [sb.length, 0].concat(
82
-            [["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''),
83
-                ["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')]
84
-        ));
81
+        if (videoSources.base) {
82
+            sb.splice.apply(sb, [sb.length, 0].concat(
83
+                [["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''),
84
+                    ["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')]
85
+            ));
86
+        }
85 87
 
86 88
         this.logger.info(['Generated substream ', i, ' with SSRC ', simSSRC, '.'].join(''));
87 89
 

Laden…
Abbrechen
Speichern