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
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Interface | Method |
---|---|
ProductInfoManagerObject | |
ProductInfoManager | DOMString getVersion () DOMString getFirmware () DOMString getDuid () DOMString getModelCode () DOMString getModel () unsigned short getSmartTVServerType () DOMString getSmartTVServerVersion () DOMString getTunerEpop () boolean isSoccerModeEnabled () boolean isTtvSupported () boolean isUdPanelSupported () DOMString getRealModel () ProductInfoNoClass3dSupport getNoGlass3dSupport () DOMString getLocalSet () DOMString getSystemConfig (unsigned int key) void setSystemConfig(unsigned int key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror); unsigned long addSystemConfigChangeListener(ProductInfoConfigChangeCallback listener, unsigned int key); void removeSystemConfigChangeListener(unsigned long listenerId); |
ProductInfoConfigChangeCallback | void onchange (unsigned int key) |
ProductInfoConfigKey | |
ProductInfoNoGlass3dSupport | |
ProductInfoSiServerType |
[NoInterfaceObject]interface ProductInfoManagerObject {
readonly attribute ProductInfoManager productinfo;
};
WebApi implements ProductInfoManagerObject;
[NoInterfaceObject]interface ProductInfoManager {
attribute ProductInfoConfigKey ProductInfoConfigKey;
attribute ProductInfoNoGlass3dSupport ProductInfoNoGlass3dSupport;
attribute ProductInfoSiServerType ProductInfoSiServerType;
DOMString getVersion();
DOMString getFirmware();
DOMString getDuid();
DOMString getModelCode();
DOMString getModel();
ProductInfoSiServerType getSmartTVServerType();
DOMString getSmartTVServerVersion();
DOMString getTunerEpop();
boolean isSoccerModeEnabled();
boolean isTtvSupported();
boolean isUdPanelSupported();
DOMString getRealModel();
ProductInfoNoGlass3dSupport getNoGlass3dSupport();
DOMString getLocalSet();
DOMString getSystemConfig(ProductInfoConfigKey key);
void setSystemConfig(ProductInfoConfigKey key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
unsigned long addSystemConfigChangeListener(ProductInfoConfigKey key, ProductInfoConfigChangeCallback listener);
void removeSystemConfigChangeListener(unsigned long listenerId);
boolean isUHDAModel();
};
getVersion
DOMString getVersion();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Plugin versionExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getVersion();
console.log(" version value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getFirmware
DOMString getFirmware();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Firmware versionExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getFirmware();
console.log(" Firmware value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getDuid
DOMString getDuid();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
DUIDExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getDuid();
console.log(" Duid value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getModelCode
DOMString getModelCode();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Model codeExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getModelCode();
console.log(" ModelCode value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getModel
DOMString getModel();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Model nameExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getModel();
console.log(" Model value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getSmartTVServerType
ProductInfoSiServerType getSmartTVServerType();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Infolink server typeExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getSmartTVServerType();
console.log(" smart tv server type = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getSmartTVServerVersion
DOMString getSmartTVServerVersion();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Infolink server versionExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getSmartTVServerVersion();
console.log(" smart tv server version = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getTunerEpop
DOMString getTunerEpop();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Tuner valueExceptions:
with error type NotSupportedError, if the device is a BD device.
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getTunerEpop();
console.log(" Tuner Epop = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
isSoccerModeEnabled
boolean isSoccerModeEnabled();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Boolean value:Exceptions:
with error type NotSupportedError, if the device is a BD device.
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.isSoccerModeEnabled();
console.log(" SoccerMode = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
isTtvSupported
boolean isTtvSupported();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Boolean value:Exceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.isTtvSupported();
console.log(" support = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
isUdPanelSupported
boolean isUdPanelSupported();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Boolean value:Exceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.isUdPanelSupported();
console.log(" support = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getRealModel
DOMString getRealModel();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Model nameExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getRealModel();
console.log(" ModelName value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getNoGlass3dSupport
ProductInfoNoGlass3dSupport getNoGlass3dSupport();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
NoGlass3dSupport valueExceptions:
with error type NotSupportedError, if the device is a BD device.
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getNoGlass3dSupport();
console.log(" 3dSupport value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getLocalSet
DOMString getLocalSet();
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
LocalSet valueExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getLocalSet();
console.log(" LocalSet value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
getSystemConfig
DOMString getSystemConfig(ProductInfoConfigKey key);
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Parameters:
Return value:
System configuration valueExceptions:
with error type TypeMismatchError, if an input parameter is not compatible with its expected type.
with error type InvalidValuesError, if any of the input parameters contain an invalid value. (Since plugin version 3.0)
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.getSystemConfig(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE);
console.log("SystemConfig value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
setSystemConfig
void setSystemConfig(ProductInfoConfigKey key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Parameters:
Exceptions:
with error type TypeMismatchError, if an input parameter is not compatible with its expected type.
with error type InvalidValuesError, if any of the input parameters contain an invalid value.
If only setSystemConfig can set CONFIG_KEY_DATA_SERVICE or CONFIG_KEY_ACTIVE_CATEGORY (Since plugin version 3.0)
with error type NotSupportedError, if 'CONFIG_KEY_SERVICE_COUNTRY' is readonly (Deprecated since plugin version 3.0)
with error type NotSupportedError, if 'CONFIG_KEY_SHOPLOGO' is readonly (Deprecated since plugin version 3.0)
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
function onsuccess(data) {
console.log("SystemConfig data = " + data);
}
function onerror(error) {
console.log("error code : " + error.code);
}
try {
webapis.productinfo.setSystemConfig(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE, value, onsuccess, onerror);
} catch (error) {
console.log(" error code = " + error.code);
}
addSystemConfigChangeListener
unsigned long addSystemConfigChangeListener(ProductInfoConfigKey key, ProductInfoConfigChangeCallback listener);
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Parameters:
Return value:
unsigned long return value of listener idExceptions:
with error type TypeMismatchError, if an input parameter is not compatible with its expected type.
with error type InvalidValuesError, if any of the input parameters contain an invalid value. (Since plugin version 3.0)
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.addSystemConfigChangeListener(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE, listener);
console.log(" add Listener value = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
removeSystemConfigChangeListener
void removeSystemConfigChangeListener(unsigned long listenerId);
Since : 2.4
Product : SSSP
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Parameters:
Exceptions:
with error type TypeMismatchError, if an input parameter is not compatible with its expected type.
with error type InvalidValuesError, if any of the input parameters contain an invalid value. (Since plugin version 3.0)
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
webapis.productinfo.removeSystemConfigChangeListener(listenerId);
console.log(" removedListener value ");
} catch (error) {
console.log(" error code = " + error.code);
}
isUHDAModel
boolean isUHDAModel();
Since : 3.0
Product : Smart Signage
Privilege level: public
Privilege: http://developer.samsung.com/privilege/productinfo
Return value:
Boolean value:Exceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
Code example:
try {
var value = webapis.productinfo.isUHDAModel();
console.log(" support = " + value);
} catch (error) {
console.log(" error code = " + error.code);
}
[Callback = FunctionOnly, NoInterfaceObject]interface ProductInfoConfigChangeCallback {
void onchange(ProductInfoConfigKey key);
};
onchange
void onchange(unsigned short key);
Since : 2.4
Product : SSSP
Parameters:
Code example:
var onchange = function (key){
console.log(" changed key is = " + key);
}
[NoInterfaceObject]interface ProductInfoConfigKey {
const unsigned long CONFIG_KEY_DATA_SERVICE = 0;
const unsigned long CONFIG_KEY_SERVICE_COUNTRY = 1;
};
Since : 2.3
Since : 2.4
Since : 2.4
[NoInterfaceObject]interface ProductInfoNoGlass3dSupport {
const unsigned long NO_GLASS_3D_NOT_SUPPORTED = 0;
const unsigned long NO_GLASS_3D_SUPPORTED = 1;
};
Since : 2.3
Since : 2.3
Since : 2.3
[NoInterfaceObject]interface ProductInfoSiServerType {
const unsigned long SI_TYPE_OPERATIING_SERVER = 0;
const unsigned long SI_TYPE_DEVELOPMENT_SERVER = 1;
const unsigned long SI_TYPE_DEVELOPING_SERVER = 2;
};
Since : 2.3
Since : 2.4
Since : 2.4
Since : 2.4
module ProductInfo {
[NoInterfaceObject]interface ProductInfoManagerObject {
readonly attribute ProductInfoManager productinfo;
};
WebApi implements ProductInfoManagerObject;
[NoInterfaceObject]interface ProductInfoManager {
attribute ProductInfoConfigKey ProductInfoConfigKey;
attribute ProductInfoNoGlass3dSupport ProductInfoNoGlass3dSupport;
attribute ProductInfoSiServerType ProductInfoSiServerType;
DOMString getVersion();
DOMString getFirmware();
DOMString getDuid();
DOMString getModelCode();
DOMString getModel();
ProductInfoSiServerType getSmartTVServerType();
DOMString getSmartTVServerVersion();
DOMString getTunerEpop();
boolean isSoccerModeEnabled();
boolean isTtvSupported();
boolean isUdPanelSupported();
DOMString getRealModel();
ProductInfoNoGlass3dSupport getNoGlass3dSupport();
DOMString getLocalSet();
DOMString getSystemConfig(ProductInfoConfigKey key);
void setSystemConfig(ProductInfoConfigKey key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
unsigned long addSystemConfigChangeListener(ProductInfoConfigKey key, ProductInfoConfigChangeCallback listener);
void removeSystemConfigChangeListener(unsigned long listenerId);
boolean isUHDAModel();
};
[Callback = FunctionOnly, NoInterfaceObject]interface ProductInfoConfigChangeCallback {
void onchange(ProductInfoConfigKey key);
};
[NoInterfaceObject]interface ProductInfoConfigKey {
const unsigned long CONFIG_KEY_DATA_SERVICE = 0;
const unsigned long CONFIG_KEY_SERVICE_COUNTRY = 1;
};
[NoInterfaceObject]interface ProductInfoNoGlass3dSupport {
const unsigned long NO_GLASS_3D_NOT_SUPPORTED = 0;
const unsigned long NO_GLASS_3D_SUPPORTED = 1;
};
[NoInterfaceObject]interface ProductInfoSiServerType {
const unsigned long SI_TYPE_OPERATIING_SERVER = 0;
const unsigned long SI_TYPE_DEVELOPMENT_SERVER = 1;
const unsigned long SI_TYPE_DEVELOPING_SERVER = 2;
};
};