To use Samsung Product API, <script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script> Should be loaded in index.html
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 Preview functionalities provided by the Tizen Samsung TV Product API.
Since: 2.3
Product: TV, AV_BD
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;
This interface provides methods to use the AvInfo functionalities.
[NoInterfaceObject]interface AvInfoManager { readonly attribute AvInfoDigitalCompMode AvInfoDigitalCompMode; DOMString getVersion(); AvInfoDigitalCompMode getDolbyDigitalCompMode(); boolean isHdrTvSupport(); };
getVersion
This method get the plugin's version number.
DOMString getVersion();
Since : 2.3
Product : TV, AV_BD
Return value: return value of plugin's version
Exceptions:
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();
Return value: dolby digital component mode
try { var mode = webapis.avinfo.getDolbyDigitalCompMode(); console.log("mode = " + mode); } catch (error) { console.log("error code = " + error.code); }
This method is to check whether the HDR is supported or not.
boolean isHdrTvSupport();
Product : TV, AV_BD Return value: return value of boolean
try { var nResult = webapis.avinfo.isHdrTvSupport(); console.log("nResult = " + nResult); } catch (error) { console.log("error code = " + error.code); }
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; };
DOLBY_DIGITAL_COMP_MODE_LINE
line mode
DOLBY_DIGITAL_COMP_MODE_RF
rf mode
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; }; };