AvInfo API

To use Samsung Product API,

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

Should be loaded in index.html

This module defines the TV audio and video settings functionalities provided by the Tizen Samsung Product API.

Since : 2.3

Product : TV, AV, B2B

Summary of Interfaces and Methods

Interface Method
AvInfoManagerObject

AvInfoManager

DOMString getVersion();
AvInfoDigitalCompMode getDolbyDigitalCompMode();
boolean isHdrTvSupport();

AvInfoDigitalCompMode

1. Interfaces

1.1 AvInfoManagerObject

Defines a WebApi object instance of the Tizen Samsung Product API.
The webapis.avinfo object enables access to AVInfo API functionality.

[NoInterfaceObject] interface AvInfoManagerObject {
  readonly attribute AvInfoManager avinfo;
};
WebApi implements AvInfoManagerObject;

Attributes

1.2 AvInfoManager

This interface provides methods to use the AvInfo functionalities.

[NoInterfaceObject] interface AvInfoManager {
  readonly attribute AvInfoDigitalCompMode AvInfoDigitalCompMode;

  DOMString getVersion();
  AvInfoDigitalCompMode getDolbyDigitalCompMode();
  boolean isHdrTvSupport();
};

Attributes

Methods

getVersion

This method get the plugin's version number.

DOMString getVersion();

Product : TV, AV, B2B

Return Value :

  • DOMString : return value of plugin's version

Exceptions :

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method

Since : 2.3

Code Example :

try {
  var value = webapis.avinfo.getVersion();
  console.log("version value = " + value);
} catch (error) {
  console.log("error code = " + error.code);
}

getDolbyDigitalCompMode

This method get dolby digital component mode.

AvInfoDigitalCompMode getDolbyDigitalCompMode();

Product : TV, AV, B2B

Return Value :

Exceptions :

  • WebAPIException
    • with error type NotSupportedError, this feature doesn't be supported since 2016

Since : 2.3

Deprecated : 4.0

Code Example :

try {
  var mode = webapis.avinfo.getDolbyDigitalCompMode();
  console.log("mode = " + mode);
} catch (error) {
  console.log("error code = " + error.code);
}

isHdrTvSupport

This method is to check whether the HDR is supported or not.

boolean isHdrTvSupport();

Product : TV, AV, B2B

Return Value :

  • boolean : return value of boolean
    true is support
    false is not support

Exceptions :

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method

Since : 2.3

Code Example :

try {
  var nResult = webapis.avinfo.isHdrTvSupport();
  console.log("nResult = " + nResult);
} catch (error) {
  console.log("error code = " + error.code);
}

1.3 AvInfoDigitalCompMode

This interface defines the digital mode

[NoInterfaceObject] interface AvInfoDigitalCompMode {
  const unsigned long DOLBY_DIGITAL_COMP_MODE_LINE = 0;
  const unsigned long DOLBY_DIGITAL_COMP_MODE_RF = 1;
};

Constants

  • DOLBY_DIGITAL_COMP_MODE_LINE
    line mode
  • DOLBY_DIGITAL_COMP_MODE_RF
    rf mode

2. Full WebIDL

module AvInfo {
  [NoInterfaceObject] interface AvInfoManagerObject {
    readonly attribute AvInfoManager avinfo;
  };

  WebApi implements AvInfoManagerObject;

  [NoInterfaceObject] interface AvInfoManager {
    readonly attribute AvInfoDigitalCompMode AvInfoDigitalCompMode;
  
    DOMString getVersion();
    AvInfoDigitalCompMode getDolbyDigitalCompMode();
    boolean isHdrTvSupport();
  };

  [NoInterfaceObject] interface AvInfoDigitalCompMode {
    const unsigned long DOLBY_DIGITAL_COMP_MODE_LINE = 0;
    const unsigned long DOLBY_DIGITAL_COMP_MODE_RF = 1;
  };

};