openvidu-browser: bug fix when checking system requirements on motorola edge devices

pull/803/head
pabloFuente 2023-05-19 13:39:19 +02:00
parent ba0e736da9
commit 58c15b0e3c
2 changed files with 16 additions and 2 deletions

View File

@ -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()
);
}

View File

@ -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
*/
@ -168,10 +176,14 @@ export class PlatformUtils {
this.isSamsungBrowser() ||
this.isIonicAndroid() ||
this.isIonicIos() ||
this.isElectron()
this.isElectron() ||
// TODO: remove when possible
this.isMotorolaEdgeDevice()
);
}
/**
* @hidden
*/