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 a device's remote power functionalities in standby mode, provided by the Tizen Samsung Product API. The device power state can be controlled remotely if it is in remote mode (background standby mode).
Since : 6.5
Product : B2B (HTV)
Privilege Level : Partner
Privilege : http://developer.samsung.com/privilege/systemcontrol
Enable or disable a device.
enum VirtualStandByMode { "ACTIVATION", "DEACTIVATION" };
The following values are supported
The supported power states for a device.
enum PowerState { "NORMAL", "STANDBY", "OFF" };
This interface defines what is instantiated by the Remote Power object of the Tizen Samsung Product API. A webapis.remotepower object allows access to the functionality of the Remote Power API.
[NoInterfaceObject] interface RemotePowerManagerObject { readonly attribute RemotePowerManager remotepower; };
WebApi implements RemotePowerManagerObject;
This interface provides methods to use the Power functionalities in standby mode.
[NoInterfaceObject] interface RemotePowerManager { DOMString getVersion(); void powerOn(); void powerOff(); PowerState getPowerState(); VirtualStandByMode getVirtualStandbyMode(); };
This interface provides a method to get a Power module's version.
DOMString getVersion();
Return Value :
Exceptions :
Code Example :
var Version = null; try { Version = webapis.remotepower.getVersion(); } catch (e) { console.log("[getVersion] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message); } console.log("[getVersion] call syncFunction type: " + Version);
When the Virtual Standby mode is activated, the power state can operate and is changed to Normal after a powerOn operation. API action condition is Activation ON and PowerState is STANDBY
void powerOn();
try { webapis.remotepower.powerOn(); } catch (e) { console.log("[power] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message); }
When the Virtual Standby mode is activated, the power state is changed to Standby after a powerOff operation, and when it is deactivated, the device is turned off completely instead.
void powerOff();
try { webapis.remotepower.powerOff(); } catch (e) { console.log("[power] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message); }
This interface provides methods to get the power state.
PowerState getPowerState();
var PowerState = null; try { PowerState = webapis.remotepower.getPowerState(); console.log("[getPowerState] call syncFunction type: " + PowerState); } catch (e) { console.log("[getPowerState] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message); }
Get the Virtual Standby mode value. This is intended only for HTV product models.
VirtualStandByMode getVirtualStandbyMode();
var StandByState = null; try { StandByState = webapis.remotepower.getVirtualStandbyMode(); console.log("[getVirtualStandbyMode] call syncFunction type: " + StandByState); } catch (e) { console.log("[getVirtualStandbyMode] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message); }
module RemotePower { enum VirtualStandByMode { "ACTIVATION", "DEACTIVATION" }; enum PowerState { "NORMAL", "STANDBY", "OFF" }; [NoInterfaceObject] interface RemotePowerManagerObject { readonly attribute RemotePowerManager remotepower; }; WebApi implements RemotePowerManagerObject; [NoInterfaceObject] interface RemotePowerManager { DOMString getVersion(); void powerOn(); void powerOff(); PowerState getPowerState(); VirtualStandByMode getVirtualStandbyMode(); }; };