To use Samsung Product API,
<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>
Should be loaded in index.html
Since : 2.4
Product : SSSP
Interface | Method |
---|---|
AvInfoManagerObject | |
AvInfoManager | DOMString getVersion (); AvInfoDigitalCompMode getDolbyDigitalCompMode(); boolean isHdrTvSupport(); |
AvInfoDigitalCompMode |
[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();
Since : 2.4
Product : SSSP
Return value:
return value of plugin's versionExceptions:
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();
Since : 2.4
Product : SSSP
Return value:
dolby digital component modeExceptions:
with error type NotSupportedError, this feature doesn't be supported since 2016
Code example:
try {
var mode = webapis.avinfo.getDolbyDigitalCompMode();
console.log("mode = " + mode);
} catch (error) {
console.log("error code = " + error.code);
}
isHdrTvSupport
boolean isHdrTvSupport();
Since : 2.4
Product : SSSP
Return value:
return value of boolean
Exceptions:
with error type SecurityError, if the application does not have the privilege to call this method
Code example:
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;
};
};