remoteControl
The sos.management.remoteControl
groups together methods for enabling or disabling control of the device using an IR remote controller (TV controller).
Remote Control Management Capabilities
Capability | Description |
---|---|
SET_REMOTE_CONTROL_ENABLED | If device supports setting remote control |
If you want to check if the device supports this capability, use sos.management.supports()
.
Methods
disable()
The disable()
method disables remote control.
disable(): Promise<void>;
Possible errors
If the device does not support remote control management.
Example
await sos.management.remoteControl.disable();
enable()
The enable()
method enables remote control.
Android: To prevent Android from displaying the Android homepage and thus not showing your content, you must Enable Kiosk Mode (or Lock Remote Control) either through Box device settings or through API.
Always set the Remote Control Lock to enable
after the deployment.
enable(): Promise<void>;
Return value
A promise that resolves when the remote control is successfully enabled.
Possible errors
If the device does not support remote control management.
Example
await sos.management.remoteControl.enable();
isEnabled()
The isEnabled()
method returns whether the remote control is enabled.
isEnabled(): Promise<boolean>;
Return value
A promise that resolves to true
if remote control is enabled, otherwise false
.
Possible errors
If the device does not support remote control management.
Example
const enabled = await sos.management.remoteControl.isEnabled();
isLocked()
The isLocked()
method returns whether the remote control is locked (disabled).
isLocked(): Promise<boolean>;
Return value
A promise that resolves to true
if the remote control is locked (disabled), otherwise false
.
Possible errors
If the device does not support remote control management.
Example
const locked = await sos.management.remoteControl.isLocked();
lock()
The lock()
method is an alias for the disable()
method.
lock(): Promise<void>;
Return value
A promise that resolves when the remote control is successfully locked (disabled).
Possible errors
If the device does not support remote control management.
Example
await sos.management.remoteControl.lock();
unlock()
The unlock()
method is an alias for the enable()
method.
unlock(): Promise<void>;
Return value
A promise that resolves when the remote control is successfully unlocked (enabled).
Possible errors
If the device does not support remote control management.
Example
await sos.management.remoteControl.unlock();