Skip to content

Commit

Permalink
fix(ScreenObtainer): allow Electron to use getDisplayMedia, hidden be…
Browse files Browse the repository at this point in the history
…hind a flag for now (#2605)
  • Loading branch information
DanielMcAssey authored Jan 23, 2025
1 parent 22daa35 commit 8a5c1dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/RTC/ScreenObtainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ const ScreenObtainer = {
* @private
*/
_createObtainStreamMethod() {
if (browser.isElectron()) {
const supportsGetDisplayMedia = browser.supportsGetDisplayMedia();

if (browser.isElectron() && !this.options.electronUseGetDisplayMedia) {
return this.obtainScreenOnElectron;
} else if (browser.isReactNative() && browser.supportsGetDisplayMedia()) {
} else if (browser.isReactNative() && supportsGetDisplayMedia) {
return this.obtainScreenFromGetDisplayMediaRN;
} else if (browser.supportsGetDisplayMedia()) {
} else if (supportsGetDisplayMedia) {
return this.obtainScreenFromGetDisplayMedia;
}
logger.log('Screen sharing not supported on ', browser.getName());
Expand Down

0 comments on commit 8a5c1dd

Please sign in to comment.