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 system state and settings functionalities provided by the Tizen Samsung Product API.
Since : 6.0
Product : TV, B2B
Defines a WebApi object instance of the Tizen Samsung Product API. The webapis.systeminfo object enables access to SystemInfo API functionality.
[NoInterfaceObject] interface SystemInfoManagerObject { readonly attribute SystemInfoManager systeminfo; };
WebApi implements SystemInfoManagerObject;
Provides methods for SystemInfo functionalities.
[NoInterfaceObject] interface SystemInfoManager { DOMString getVersion(); boolean isSupportedAudioCodec(DOMString audiocodec); boolean isSupportedVideoCodec(DOMString videocodec); };
This method retrieves the plugin's version information
DOMString getVersion();
Return Value :
Code Example :
try { var version = webapis.systeminfo.getVersion(); console.log("Version = " + version); } catch(error) { console.log("error code = " + error.code); }
This method check whether the audio codec is supported or not
boolean isSupportedAudioCodec(DOMString audiocodec);
Parameters :
Exceptions :
try { var audiocodec = "MPEG"; var value = webapis.systeminfo.isSupportedAudioCodec(audiocodec); } catch(error) { console.log("error code = " + error.code); }
This method check whether the video codec is supported or not
boolean isSupportedVideoCodec(DOMString videocodec);
try { var videocodec = "MPEG4"; var value = webapis.systeminfo.isSupportedVideoCodec(videocodec); } catch(error) { console.log("error code = " + error.code); }
module SystemInfo { [NoInterfaceObject] interface SystemInfoManagerObject { readonly attribute SystemInfoManager systeminfo; }; WebApi implements SystemInfoManagerObject; [NoInterfaceObject] interface SystemInfoManager { DOMString getVersion(); boolean isSupportedAudioCodec(DOMString audiocodec); boolean isSupportedVideoCodec(DOMString videocodec); }; };