이 페이지의 이전 버전을 보고 있습니다. 현재 버전 보기.

현재와 비교 페이지 이력 보기

« 이전 버전 11 현재 »

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

    name

    Return value

    유형설명

    player_version

    string

    value: w player version

    fw_version

    string

    value: firmware version

    variable_tag

    array

    value: tag list

    mis_ip

    string

    value: MagicInfo Server ip address

    mac

    string

    value: mac address

    ipaddress

    string

    value: ip address

    resolution

    object

    { width: 1920, height: 1080 }

    orientation

    string

    value: landscape/portrait

  • 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 name

    Return 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);