|
|
|
|
321
|
// Provide constraints as described by the electron desktop capturer
|
321
|
// Provide constraints as described by the electron desktop capturer
|
322
|
// documentation here:
|
322
|
// documentation here:
|
323
|
// https://www.electronjs.org/docs/api/desktop-capturer
|
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
|
constraints.audio = { mandatory: {
|
328
|
constraints.audio = { mandatory: {
|
325
|
chromeMediaSource: constraints.video.mandatory.chromeMediaSource
|
329
|
chromeMediaSource: constraints.video.mandatory.chromeMediaSource
|
326
|
} };
|
330
|
} };
|
327
|
-
|
|
|
328
|
- delete constraints.video.mandatory.chromeMediaSourceId;
|
|
|
329
|
}
|
331
|
}
|
330
|
}
|
332
|
}
|
331
|
|
333
|
|