Skip to content

Commit

Permalink
Fix #621 - Detect Oculus Quest Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Jan 24, 2023
1 parent a6140a1 commit 5d4ca2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
], [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]], [
/droid.+; (wt63?0{2,3})\)/i
], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [
/(quest( 2)?)/i // Oculus Quest
/(quest( 2| pro)?)/i // Oculus Quest
], [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]], [

///////////////////
Expand Down
9 changes: 9 additions & 0 deletions test/device-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,15 @@
"type": "wearable"
}
},
{
"desc": "Oculus Quest Pro",
"ua": "Mozilla/5.0 (X11; Linux x86_64; Quest Pro) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/24.4.0.22.60.426469926 SamsungBrowser/4.0 Chrome/106.0.5249.181 VR Safari/537.36",
"expect": {
"vendor": "Facebook",
"model": "Quest Pro",
"type": "wearable"
}
},
{
"desc": "OnePlus One",
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; A0001 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36",
Expand Down

0 comments on commit 5d4ca2b

Please sign in to comment.