简体   繁体   中英

How to identify Amazon Fire TV and Fire Stick in code level (HTML/JavaScript) ..?

I have developed a Fire TV application using HTML5 and JavaScript. Here I need to identify what is the currently accessing device. Either Amazon Fire TV or Amazon Fire Stick.

How can I do this using HTML/JavaScript..?

Thanks

You should be able to distinguish them by checking the user agent string which has the device model .

android.os.Build.MODEL

  • AFTB (Fire TV Gen 1)
  • AFTS (Fire TV Gen 2)
  • AFTM (Fire TV Stick Gen 1)
  • AFTT (Fire TV Stick Gen 2)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM