Skip to content

Commit

Permalink
Merge pull request #471 from jishidaaaaa/fix-firetv-detection
Browse files Browse the repository at this point in the history
Fix Detection Rule For Amazon Fire TV
  • Loading branch information
faisalman authored Jan 5, 2021
2 parents fd8a583 + b0f14de commit 89a72c2
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 @@ -451,7 +451,7 @@
], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [
/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i // Fire Phone
], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [
/android.+aft([bms])\sbuild/i // Fire TV
/android.+aft([\w])(\sbuild\/|\))/i // Fire TV
], [MODEL, [VENDOR, 'Amazon'], [TYPE, SMARTTV]], [

/\((ip[honed|\s\w*]+);.+(apple)/i // iPod/iPhone
Expand Down
9 changes: 9 additions & 0 deletions test/device-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,15 @@
"type": "smarttv"
}
},
{
"desc": "Amazon Fire TV",
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; AFTT) AppleWebKit/537.36 (KHTML, like Gecko) Silk/86.3.20 like Chrome/86.0.4240.198 Safari/537.36",
"expect": {
"vendor": "Amazon",
"model": "T",
"type": "smarttv"
}
},
{
"desc": "Gigaset Tablet",
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Gigaset QV830 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
Expand Down

0 comments on commit 89a72c2

Please sign in to comment.