Skip to main content

$wp.device: Device Properties (W Player API)

This interface provides APIs required for obtaining resource information related to devices such as W Player and Tizen.

getProperty()​

  • Description Find the property value of the device.
  • Syntax function getProperty(‘name’);
  • Parameter View the names of provided properties from the table below, and enter the property name of the information you need as a parameter. name: Property name
nameReturn value
TypeDescription
stringvalue: w player version
stringvalue: firmware version
arrayvalue: tag list
stringvalue: MagicInfo Server ip address
stringvalue: mac address
stringvalue: ip address
object{ width: 1920, height: 1080 }
  • Return value Type: Refer to the table above If API has been run successfully: Normal value If API has not been run successfully: undefined Type: bool
  • Code example $wp.device.getProperty(‘mac’);

getPropertyType()​

  • Description Import the names of properties provided in the device interface.
Property nameReturn value
PLAYER_VERSION'player_version'
FIRMWARE_VERSION'fw_version'
VARIABLE_TAG'variable_tag'
MIS_IP'mis_ip'
MACADDRESS'mac'
IPADDRESS'ipaddress'
RESOLUTION'resolution'
ORIENTATION'orientation'
  • Syntax function getPropertyType();
  • Parameter None
  • Return value Success: object (property name), fail: Always successful
  • Code example $wp.device.getPropertyType();
  • Others If you convert objects returned from $wp.device.getPropertyType(); to variables, typos can be prevented. var devicePropertyType = $wp.device.getPropertyType(); $wp.device.getProperty(devicePropertyType.MACADDRESS);