openvidu-browser: allow screen sharing with Edge

pull/559/head
pabloFuente 2020-11-16 14:04:18 +01:00
parent c1f34e0757
commit a92335b5be
2 changed files with 2 additions and 3 deletions

View File

@ -878,7 +878,7 @@ export class OpenVidu {
// Screen sharing // Screen sharing
if (!this.checkScreenSharingCapabilities()) { if (!this.checkScreenSharingCapabilities()) {
const error = new OpenViduError(OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome, Firefox, Opera, Safari (>=13.0) or Electron. Detected client: ' + platform.getName()); const error = new OpenViduError(OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED, 'You can only screen share in desktop Chrome, Firefox, Opera, Safari (>=13.0), Edge (>= 80) or Electron. Detected client: ' + platform.getName() + ' ' + platform.getVersion());
logger.error(error); logger.error(error);
reject(error); reject(error);
} else { } else {

View File

@ -146,17 +146,16 @@ export class PlatformUtils {
*/ */
public canScreenShare(): boolean { public canScreenShare(): boolean {
const version = platform?.version ? parseFloat(platform.version) : -1; const version = platform?.version ? parseFloat(platform.version) : -1;
// Reject mobile devices // Reject mobile devices
if (this.isMobileDevice()) { if (this.isMobileDevice()) {
return false; return false;
} }
return ( return (
this.isChromeBrowser() || this.isChromeBrowser() ||
this.isFirefoxBrowser() || this.isFirefoxBrowser() ||
this.isOperaBrowser() || this.isOperaBrowser() ||
this.isElectron() || this.isElectron() ||
this.isEdgeBrowser() ||
(this.isSafariBrowser() && version >= 13) (this.isSafariBrowser() && version >= 13)
); );
} }