Browse Source

fix(RTCUtils): system audio share multiple desktop

dev1
Andrei Gavrilescu 4 years ago
parent
commit
ccaeb9f25f
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      modules/RTC/RTCUtils.js

+ 4
- 2
modules/RTC/RTCUtils.js View File

@@ -321,11 +321,13 @@ function getConstraints(um, options = {}) {
321 321
             // Provide constraints as described by the electron desktop capturer
322 322
             // documentation here:
323 323
             // https://www.electronjs.org/docs/api/desktop-capturer
324
+            // Note. The documentation specifies that chromeMediaSourceId should not be present
325
+            // which, in the case a users has multiple monitors, leads to them being shared all
326
+            // at once. However we tested with chromeMediaSourceId present and it seems to be
327
+            // working properly and also takes care of the previously mentioned issue.
324 328
             constraints.audio = { mandatory: {
325 329
                 chromeMediaSource: constraints.video.mandatory.chromeMediaSource
326 330
             } };
327
-
328
-            delete constraints.video.mandatory.chromeMediaSourceId;
329 331
         }
330 332
     }
331 333
 

Loading…
Cancel
Save