mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Improve device detection for unknown VR device
This commit is contained in:
parent
852520fafe
commit
20e874085b
@ -856,10 +856,8 @@
|
|||||||
// MIXED (GENERIC)
|
// MIXED (GENERIC)
|
||||||
///////////////////
|
///////////////////
|
||||||
|
|
||||||
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
|
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i
|
||||||
], [MODEL, [TYPE, MOBILE]], [
|
], [MODEL, [TYPE, strMapper, { 'mobile' : 'Mobile', 'xr' : 'VR', '*' : TABLET }]], [
|
||||||
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
|
|
||||||
], [MODEL, [TYPE, TABLET]], [
|
|
||||||
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
|
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
|
||||||
], [[TYPE, TABLET]], [
|
], [[TYPE, TABLET]], [
|
||||||
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
|
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
|
||||||
|
@ -24,6 +24,14 @@
|
|||||||
"type": "mobile"
|
"type": "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc": "Unknown VR Device",
|
||||||
|
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; Unknown Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile VR Safari/537.36",
|
||||||
|
"expect": {
|
||||||
|
"model": "Unknown",
|
||||||
|
"type": "xr"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc": "Desktop (IE11 with Tablet string)",
|
"desc": "Desktop (IE11 with Tablet string)",
|
||||||
"ua": "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; GWX:MANAGED; rv:11.0) like Gecko",
|
"ua": "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; GWX:MANAGED; rv:11.0) like Gecko",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user