bestiejs / platform.js

A platform detection library.
https://mths.be/platform
MIT License
3.22k stars 408 forks source link

Chrome on the Motorola Edge Plus phone is being parsed as Microsoft Edge #184

Open JonnyWong16 opened 4 years ago

JonnyWong16 commented 4 years ago

The user agent for mobile Chrome 84.0.414789 on the Motorola Edge Plus phone is being parsed as Microsoft Edge.

User agent:

Mozilla/5.0 (Linux; Android 10; motorola edge plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Mobile Safari/537.36

https://bestiejs.github.io/platform.js/?ua=Mozilla%2F5.0+%28Linux%3B+Android+10%3B+motorola+edge+plus%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F84.0.4147.89+Mobile+Safari%2F537.36

{
    "name": "Microsoft Edge",
    "version": null,
    "layout": "EdgeHTML",
    "prerelease": null,
    "os": "Android 10",
    "manufacturer": "Motorola",
    "product": "Motorola",
    "description": "Microsoft Edge on Motorola (Android 10)",
    "ua": "Mozilla/5.0 (Linux; Android 10; motorola edge plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Mobile Safari/537.36"
}

Reference: Tautulli/Tautulli-Issues#264

bnjmnt4n commented 4 years ago

Thanks for the report. I'll look into how we approach our handling of this given that Edge is used pretty commonly in product names these days (eg. Galaxy SX Edge).

cruizba commented 1 year ago

Hello @bnjmnt4n , we are doing this workaround in our project to allow Motorola browsers to work with OpenVidu: https://github.com/OpenVidu/openvidu/commit/58c15b0e3c9880df30ce32b1ef7563e48e299998

Is there any possibility to fix the bug? We think platform.js is actually pretty solid, and fix these issues would help for new devices using the overused "Edge" word to be detected correctly by platform.js ;)