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
Provides methods for SystemInfo functionalities.
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;
[NoInterfaceObject]interface SystemInfoManager { DOMString getVersion(); boolean isSupportedAudioCodec(DOMString audiocodec); boolean isSupportedVideoCodec(DOMString videocodec); };
getVersion
This method retrieves the plugin's version information.
DOMString getVersion();
Since: 6.0
Product: TV, B2B
Return value:
Plugin version
Code example:
try { var value = webapis.systeminfo.getVersion(); console.log(" version value = " + value); } catch (error) { console.log(" error code = " + error.code); }
isSupportedAudioCodec
This method check whether the audio codec is supported or not.
boolean isSupportedAudioCodec(DOMString audiocodec);
Return: value to indicate whether the audio codec is supported or not true: supported false: unsupported
Parameters:
Exceptions:
try { var audiocodec = "MPEG"; var value = webapis.systeminfo.isSupportedAudioCodec(audiocodec); } catch(error) { console.log("error code = " + error.code); }
isSupportedVideoCodec
This method check whether the video codec is supported or not
boolean isSupportedVideoCodec(DOMString videocodec)
Return: This method check whether the video codec is supported or not true: supported false: unsupported
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); };