Skip to content

Commit

Permalink
openvidu-browser: bug fix when checking system requirements on motoro…
Browse files Browse the repository at this point in the history
…la edge devices
  • Loading branch information
pabloFuente committed May 19, 2023
1 parent ba0e736 commit 58c15b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion openvidu-browser/src/OpenVidu/OpenVidu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ export class OpenVidu {
platform.isSafariBrowser() ||
platform.isAndroidBrowser() || // Android WebView & Ionic apps for Android
platform.isElectron() ||
platform.isNodeJs()
platform.isNodeJs() ||
// TODO: remove when updating platform detection library
platform.isMotorolaEdgeDevice()
);
}

Expand Down
14 changes: 13 additions & 1 deletion openvidu-browser/src/OpenViduInternal/Utils/Platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ export class PlatformUtils {
return platform.name === 'Samsung Internet Mobile' || platform.name === 'Samsung Internet';
}

// TODO: This method exists to overcome bug https://github.com/bestiejs/platform.js/issues/184
/**
* @hidden
*/
public isMotorolaEdgeDevice(): boolean {
return platform.product?.toLowerCase().includes('motorola edge') || false;
}

/**
* @hidden
*/
Expand Down Expand Up @@ -168,10 +176,14 @@ export class PlatformUtils {
this.isSamsungBrowser() ||
this.isIonicAndroid() ||
this.isIonicIos() ||
this.isElectron()
this.isElectron() ||
// TODO: remove when possible
this.isMotorolaEdgeDevice()
);
}



/**
* @hidden
*/
Expand Down

0 comments on commit 58c15b0

Please sign in to comment.