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
Since : 2.3
Product : TV, AV_BD, B2B (LFD, IWB)
[NoInterfaceObject]interface AvInfoManagerObject { readonly attribute AvInfoManager avinfo; };
WebApi implements AvInfoManagerObject;
[NoInterfaceObject]interface AvInfoManager { readonly attribute AvInfoDigitalCompMode AvInfoDigitalCompMode; DOMString getVersion(); AvInfoDigitalCompMode getDolbyDigitalCompMode(); boolean isHdrTvSupport(); };
getVersion
DOMString getVersion();
Return value:
Exceptions:
with error type SecurityError, if the application does not have the privilege to call this method
Code example:
try { var value = webapis.avinfo.getVersion(); console.log("version value = " + value); } catch (error) { console.log("error code = " + error.code); }
getDolbyDigitalCompMode
AvInfoDigitalCompMode getDolbyDigitalCompMode();
with error type NotSupportedError, this feature doesn't be supported since 2016
try { var mode = webapis.avinfo.getDolbyDigitalCompMode(); console.log("mode = " + mode); } catch (error) { console.log("error code = " + error.code); }
isHdrTvSupport
boolean isHdrTvSupport();
return value of boolean
try { var nResult = webapis.avinfo.isHdrTvSupport(); console.log("nResult = " + nResult); } catch (error) { console.log("error code = " + error.code); }
[NoInterfaceObject]interface AvInfoDigitalCompMode { const unsigned long DOLBY_DIGITAL_COMP_MODE_LINE = 0; const unsigned long DOLBY_DIGITAL_COMP_MODE_RF = 1; };
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; }; };