Detect Smart TV

5.9k views Asked by At

Is there any script to detect if the site accessed starting this coming from a Smart TV?

I would like to detect whether a computer, tablet, mobile phone or TV. Anyone know how to do this?

3

There are 3 answers

3
Ben Barkay On BEST ANSWER

Seeing as most smart TVs use the major browser projects (such as Mozilla, Chromium, Safari etc) as their web browser, you are not going to find much difference in their behavior if at all. Your only good solution is to rely on the courtesy of the browser to provide this information to you via the user-agent property of the header.

You can consult this list of smart TV user agents to engage at your detection strategy.

0
FDisk On

You can try this service http://web.wurfl.io/#learnmore But this service is free for limited requests

0
abhi On

Refer to BBC talframework http://fmtvp.github.io/tal/getting-started/introducing-tal.html

In this framework they are using detection method for the device, Once device is detected then js according to the framework is loaded