top

How to get the product type?

Published 2014-10-27 | (Compatible with SDK 4.5,5.0,5.1 and 2013,2014 models)

Checking whether the application is running on a TV or BD

Sometimes, it is necessary for the application to distinguish between different types of platform (whether it is a TV, BD, etc.). In most cases, this feature is needed for different settings of the volume control.

Source Files

Note

The files needed for the sample application are here.

Getting the Product Type

Here is the guide to check the product type code:

  1. In index.html.

    <script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/webapis.js"></script>
    
  2. Call the getProduct function inside your javascript code. For example:

    alert('Device type: ' + deviceapis.tv.info.getProduct());
    
  3. The value returned by the function is interpreted as follows:

    • 0 - PL_TV_PRODUCT_TYPE_TV
    • 1 - PL_TV_PRODUCT_TYPE_MONITOR
    • 2 - PL_TV_PRODUCT_TYPE_BD

Note

For the SDK emulator, this function always returns fake PL_TV_PRODUCT_TYPE_TV

See also

In order to check which year series the device belongs to, please see How to check the firmware version?.