@signageos/front-applet 8.2.0 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +5 -5
- package/dist/bundle.js.map +1 -1
- package/docs/index.md +9 -9
- package/docs/sos/browser.md +11 -3
- package/docs/sos/deviceInfo.md +1 -1
- package/docs/sos/display.md +13 -20
- package/docs/sos/fileSystem.md +31 -6
- package/docs/sos/hardware/barcodeScanner.md +9 -0
- package/docs/sos/hardware/index.md +9 -0
- package/docs/sos/native/mdc.md +8 -3
- package/docs/sos/osd.md +9 -0
- package/docs/sos/video.md +9 -0
- package/docs/sos_management/app.md +97 -18
- package/docs/sos_management/audio.md +43 -2
- package/docs/sos_management/autoRecovery.md +101 -0
- package/docs/sos_management/debug.md +84 -1
- package/docs/sos_management/firmware.md +64 -1
- package/docs/sos_management/index.md +217 -19
- package/docs/sos_management/network.md +84 -29
- package/docs/sos_management/os.md +59 -4
- package/docs/sos_management/package.md +25 -3
- package/docs/sos_management/power.md +142 -18
- package/docs/sos_management/proxy.md +54 -3
- package/docs/sos_management/remoteControl.md +55 -4
- package/docs/sos_management/screen.md +140 -29
- package/docs/sos_management/security.md +48 -5
- package/docs/sos_management/time.md +76 -9
- package/docs/sos_management/wifi.md +207 -45
- package/es6/FrontApplet/Browser/Browser.d.ts +11 -3
- package/es6/FrontApplet/Browser/Browser.js +11 -3
- package/es6/FrontApplet/Browser/Browser.js.map +1 -1
- package/es6/FrontApplet/Command/Command.js +1 -0
- package/es6/FrontApplet/Command/Command.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +15 -5
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/IDeviceInfo.d.ts +1 -1
- package/es6/FrontApplet/Display/Display.d.ts +14 -19
- package/es6/FrontApplet/Display/Display.js +14 -19
- package/es6/FrontApplet/Display/Display.js.map +1 -1
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +27 -5
- package/es6/FrontApplet/FileSystem/FileSystem.js +27 -5
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +9 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +9 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
- package/es6/FrontApplet/Hardware/Hardware.d.ts +9 -0
- package/es6/FrontApplet/Hardware/Hardware.js +9 -0
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
- package/es6/FrontApplet/Management/App/App.d.ts +53 -17
- package/es6/FrontApplet/Management/App/App.js +23 -12
- package/es6/FrontApplet/Management/App/App.js.map +1 -1
- package/es6/FrontApplet/Management/App/IApp.d.ts +3 -0
- package/es6/FrontApplet/Management/Audio/Audio.d.ts +24 -3
- package/es6/FrontApplet/Management/Audio/Audio.js +24 -3
- package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +49 -3
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +49 -3
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Debug/Debug.d.ts +44 -2
- package/es6/FrontApplet/Management/Debug/Debug.js +43 -1
- package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +41 -4
- package/es6/FrontApplet/Management/Firmware/Firmware.js +33 -0
- package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
- package/es6/FrontApplet/Management/Management.d.ts +119 -21
- package/es6/FrontApplet/Management/Management.js +119 -22
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Network/Network.d.ts +44 -25
- package/es6/FrontApplet/Management/Network/Network.js +28 -14
- package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
- package/es6/FrontApplet/Management/OS/IOS.d.ts +3 -0
- package/es6/FrontApplet/Management/OS/OS.d.ts +32 -4
- package/es6/FrontApplet/Management/OS/OS.js +32 -4
- package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
- package/es6/FrontApplet/Management/Package/Package.d.ts +18 -3
- package/es6/FrontApplet/Management/Package/Package.js +18 -4
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/Power/IPower.d.ts +3 -0
- package/es6/FrontApplet/Management/Power/IPower.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +67 -20
- package/es6/FrontApplet/Management/Power/Power.js +70 -24
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +28 -3
- package/es6/FrontApplet/Management/Proxy/Proxy.js +28 -3
- package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +23 -5
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +23 -5
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/Screen.d.ts +77 -32
- package/es6/FrontApplet/Management/Screen/Screen.js +65 -26
- package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
- package/es6/FrontApplet/Management/Security/Security.d.ts +25 -7
- package/es6/FrontApplet/Management/Security/Security.js +25 -7
- package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
- package/es6/FrontApplet/Management/Time/Time.d.ts +47 -11
- package/es6/FrontApplet/Management/Time/Time.js +29 -7
- package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +3 -0
- package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +137 -42
- package/es6/FrontApplet/Management/Wifi/Wifi.js +137 -42
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +8 -3
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +8 -3
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
- package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
- package/es6/FrontApplet/OSD/OSD.js +9 -0
- package/es6/FrontApplet/OSD/OSD.js.map +1 -1
- package/es6/FrontApplet/Video/Video.d.ts +9 -0
- package/es6/FrontApplet/Video/Video.js +9 -0
- package/es6/FrontApplet/Video/Video.js.map +1 -1
- package/es6/Monitoring/DeviceInfo/deviceInfoCommands.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,17 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# proxy
|
|
6
6
|
|
|
7
|
+
The `sos.management.proxy` API groups together methods for managing the proxy settings on the device.
|
|
8
|
+
|
|
9
|
+
<details>
|
|
10
|
+
<summary>Proxy Management Capabilities</summary>
|
|
11
|
+
| Capability | Description |
|
|
12
|
+
|:------------|:-------------|
|
|
13
|
+
| `PROXY` | If device supports Proxy setup connection |
|
|
14
|
+
|
|
15
|
+
If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
16
|
+
</details>
|
|
17
|
+
|
|
7
18
|
## Methods
|
|
8
19
|
|
|
9
20
|
### disable()
|
|
@@ -14,6 +25,14 @@ The `disable()` method disables the proxy on the device.
|
|
|
14
25
|
disable(): Promise<void>;
|
|
15
26
|
```
|
|
16
27
|
|
|
28
|
+
#### Return value
|
|
29
|
+
|
|
30
|
+
A promise that resolves when the proxy is disabled.
|
|
31
|
+
|
|
32
|
+
#### Possible errors
|
|
33
|
+
|
|
34
|
+
If the device does not support proxy management.
|
|
35
|
+
|
|
17
36
|
#### Example
|
|
18
37
|
|
|
19
38
|
```ts
|
|
@@ -24,12 +43,20 @@ await sos.management.proxy.disable();
|
|
|
24
43
|
|
|
25
44
|
### getConnectedTo()
|
|
26
45
|
|
|
27
|
-
The `getConnectedTo()`
|
|
46
|
+
The `getConnectedTo()` method returns the current connected proxy server URI on the device.
|
|
28
47
|
|
|
29
48
|
```ts expandable
|
|
30
49
|
getConnectedTo(): Promise<string>;
|
|
31
50
|
```
|
|
32
51
|
|
|
52
|
+
#### Return value
|
|
53
|
+
|
|
54
|
+
A promise that resolves to the URI of the connected proxy server.
|
|
55
|
+
|
|
56
|
+
#### Possible errors
|
|
57
|
+
|
|
58
|
+
If the device does not support proxy management.
|
|
59
|
+
|
|
33
60
|
#### Example
|
|
34
61
|
|
|
35
62
|
```ts
|
|
@@ -47,24 +74,48 @@ The `isEnabled()` method returns whether the proxy is enabled on the device.
|
|
|
47
74
|
isEnabled(): Promise<boolean>;
|
|
48
75
|
```
|
|
49
76
|
|
|
77
|
+
#### Return value
|
|
78
|
+
|
|
79
|
+
A promise that resolves to a boolean indicating if the proxy is enabled.
|
|
80
|
+
|
|
50
81
|
#### Example
|
|
51
82
|
|
|
52
83
|
```ts
|
|
53
84
|
const enabled = await sos.management.proxy.isEnabled();
|
|
85
|
+
console.log(`Proxy is enabled: ${enabled}`);
|
|
54
86
|
```
|
|
55
87
|
|
|
56
88
|
<Separator />
|
|
57
89
|
|
|
58
90
|
### setManual()
|
|
59
91
|
|
|
60
|
-
The `setManual()`
|
|
92
|
+
The `setManual()` allows you to manually configure the proxy settings on the device.
|
|
61
93
|
|
|
62
94
|
```ts expandable
|
|
63
95
|
setManual(uri: string, port: number, username?: string, password?: string): Promise<void>;
|
|
64
96
|
```
|
|
65
97
|
|
|
98
|
+
#### Params
|
|
99
|
+
|
|
100
|
+
| Name | Type | Required | Description |
|
|
101
|
+
|------------|----------|------------------|-----------------------------------|
|
|
102
|
+
| `uri` | `string` | <div>Yes</div> | The URI of the proxy server |
|
|
103
|
+
| `port` | `number` | <div>Yes</div> | The port of the proxy server |
|
|
104
|
+
| `username` | `string` | <div>No</div> | The username for the proxy server |
|
|
105
|
+
| `password` | `string` | <div>No</div> | The password for the proxy server |
|
|
106
|
+
|
|
107
|
+
#### Return value
|
|
108
|
+
|
|
109
|
+
A promise that resolves when the proxy is set.
|
|
110
|
+
|
|
111
|
+
#### Possible errors
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
- If the proxy settings are invalid.
|
|
115
|
+
- If the device does not support proxy management.
|
|
116
|
+
|
|
66
117
|
#### Example
|
|
67
118
|
|
|
68
119
|
```ts
|
|
69
|
-
|
|
120
|
+
await sos.management.proxy.setManual('178.62.193.192', 1080, 'username', 'password');
|
|
70
121
|
```
|
|
@@ -4,7 +4,16 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# remoteControl
|
|
6
6
|
|
|
7
|
-
The `sos.management.remoteControl` groups together methods for enabling or disabling control of the device using IR remote controller (TV controller).
|
|
7
|
+
The `sos.management.remoteControl` groups together methods for enabling or disabling control of the device using an IR remote controller (TV controller).
|
|
8
|
+
|
|
9
|
+
<details>
|
|
10
|
+
<summary>Remote Control Management Capabilities</summary>
|
|
11
|
+
| Capability | Description |
|
|
12
|
+
|:------------|:-------------|
|
|
13
|
+
| `SET_REMOTE_CONTROL_ENABLED` | If device supports setting remote control |
|
|
14
|
+
|
|
15
|
+
If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
16
|
+
</details>
|
|
8
17
|
|
|
9
18
|
## Methods
|
|
10
19
|
|
|
@@ -16,6 +25,10 @@ The `disable()` method disables remote control.
|
|
|
16
25
|
disable(): Promise<void>;
|
|
17
26
|
```
|
|
18
27
|
|
|
28
|
+
#### Possible errors
|
|
29
|
+
|
|
30
|
+
If the device does not support remote control management.
|
|
31
|
+
|
|
19
32
|
#### Example
|
|
20
33
|
|
|
21
34
|
```ts
|
|
@@ -29,18 +42,24 @@ await sos.management.remoteControl.disable();
|
|
|
29
42
|
The `enable()` method enables remote control.
|
|
30
43
|
|
|
31
44
|
:::warning
|
|
32
|
-
|
|
33
|
-
**Android:** In order to prevent Android from displaying Android homepage and thus not showing your content, you
|
|
45
|
+
**Android:** To prevent Android from displaying the Android homepage and thus not showing your content, you
|
|
34
46
|
must Enable Kiosk Mode (or Lock Remote Control) either through Box device settings or through API.
|
|
35
47
|
|
|
36
48
|
Always set the Remote Control Lock to `enable` after the deployment.
|
|
37
|
-
|
|
38
49
|
:::
|
|
39
50
|
|
|
40
51
|
```ts expandable
|
|
41
52
|
enable(): Promise<void>;
|
|
42
53
|
```
|
|
43
54
|
|
|
55
|
+
#### Return value
|
|
56
|
+
|
|
57
|
+
A promise that resolves when the remote control is successfully enabled.
|
|
58
|
+
|
|
59
|
+
#### Possible errors
|
|
60
|
+
|
|
61
|
+
If the device does not support remote control management.
|
|
62
|
+
|
|
44
63
|
#### Example
|
|
45
64
|
|
|
46
65
|
```ts
|
|
@@ -57,6 +76,14 @@ The `isEnabled()` method returns whether the remote control is enabled.
|
|
|
57
76
|
isEnabled(): Promise<boolean>;
|
|
58
77
|
```
|
|
59
78
|
|
|
79
|
+
#### Return value
|
|
80
|
+
|
|
81
|
+
A promise that resolves to `true` if remote control is enabled, otherwise `false`.
|
|
82
|
+
|
|
83
|
+
#### Possible errors
|
|
84
|
+
|
|
85
|
+
If the device does not support remote control management.
|
|
86
|
+
|
|
60
87
|
#### Example
|
|
61
88
|
|
|
62
89
|
```ts
|
|
@@ -73,6 +100,14 @@ The `isLocked()` method returns whether the remote control is locked (disabled).
|
|
|
73
100
|
isLocked(): Promise<boolean>;
|
|
74
101
|
```
|
|
75
102
|
|
|
103
|
+
#### Return value
|
|
104
|
+
|
|
105
|
+
A promise that resolves to `true` if the remote control is locked (disabled), otherwise `false`.
|
|
106
|
+
|
|
107
|
+
#### Possible errors
|
|
108
|
+
|
|
109
|
+
If the device does not support remote control management.
|
|
110
|
+
|
|
76
111
|
#### Example
|
|
77
112
|
|
|
78
113
|
```ts
|
|
@@ -89,6 +124,14 @@ The `lock()` method is an alias for the `disable()` method.
|
|
|
89
124
|
lock(): Promise<void>;
|
|
90
125
|
```
|
|
91
126
|
|
|
127
|
+
#### Return value
|
|
128
|
+
|
|
129
|
+
A promise that resolves when the remote control is successfully locked (disabled).
|
|
130
|
+
|
|
131
|
+
#### Possible errors
|
|
132
|
+
|
|
133
|
+
If the device does not support remote control management.
|
|
134
|
+
|
|
92
135
|
#### Example
|
|
93
136
|
|
|
94
137
|
```ts
|
|
@@ -105,6 +148,14 @@ The `unlock()` method is an alias for the `enable()` method.
|
|
|
105
148
|
unlock(): Promise<void>;
|
|
106
149
|
```
|
|
107
150
|
|
|
151
|
+
#### Return value
|
|
152
|
+
|
|
153
|
+
A promise that resolves when the remote control is successfully unlocked (enabled).
|
|
154
|
+
|
|
155
|
+
#### Possible errors
|
|
156
|
+
|
|
157
|
+
If the device does not support remote control management.
|
|
158
|
+
|
|
108
159
|
#### Example
|
|
109
160
|
|
|
110
161
|
```ts
|
|
@@ -4,27 +4,38 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# screen
|
|
6
6
|
|
|
7
|
-
The `sos.management.screen` API groups together methods for controlling the screen of the device. It allows
|
|
8
|
-
resolution or orientation, set brightness, retrieve the current brightness of the display and manipulate the power mode.
|
|
7
|
+
The `sos.management.screen` API groups together methods for controlling the screen of the device. It allows for manipulating the screen
|
|
8
|
+
resolution or orientation, set brightness, retrieve the current brightness of the display, and manipulate the power mode.
|
|
9
9
|
|
|
10
10
|
:::warning
|
|
11
|
-
|
|
12
|
-
This method only turns on/off the display/backlight. It will **not** set any power-saving mode. We also strongly recommend to reboot any
|
|
11
|
+
This method only turns on/off the display/backlight. It will **not** set any power-saving mode. We also strongly recommend rebooting any
|
|
13
12
|
device once a day.
|
|
14
|
-
|
|
15
13
|
:::
|
|
16
14
|
|
|
17
15
|
:::info
|
|
18
|
-
|
|
19
16
|
There is a specific behavior based on the device type you operate:
|
|
20
|
-
**On SoC displays** (e.g
|
|
17
|
+
**On SoC displays** (e.g., Samsung Tizen, LG webOS, Android-based SoC displays from Sony, Vestel Philips,...)
|
|
21
18
|
- `powerOn()` and `powerOff()` are turning the display backlight and the panel off
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- `powerOn()` and `powerOff()` are turning off the video output (typically HDMI-out); the connected display backlight is not managed by this functionality and needs to be controlled via RS232 or another way.
|
|
25
|
-
|
|
19
|
+
**On external media players** (e.g., BrightSign, Windows PC, Android players, Raspberry Pi)
|
|
20
|
+
- `powerOn()` and `powerOff()` are turning off the video output (typically HDMI-out); this functionality does not manage the connected display backlight and needs to be controlled via RS232 or another way.
|
|
26
21
|
:::
|
|
27
22
|
|
|
23
|
+
<details>
|
|
24
|
+
<summary>Screen Management Capabilities</summary>
|
|
25
|
+
| Capability | Description |
|
|
26
|
+
|:------------|:-------------|
|
|
27
|
+
| `SET_BRIGHTNESS` | If device can brightness. |
|
|
28
|
+
| `GET_BRIGHTNESS` | If device can return current brightness. |
|
|
29
|
+
| `SCREEN_RESIZE` | If the device can change screen resolution and orientation. |
|
|
30
|
+
| `ORIENTATION_LANDSCAPE` | If device supports landscape orientation. |
|
|
31
|
+
| `ORIENTATION_PORTRAIT` | If device supports portrait orientation. |
|
|
32
|
+
| `ORIENTATION_LANDSCAPE_FLIPPED` | If device supports flipped landscape orientation. |
|
|
33
|
+
| `ORIENTATION_PORTRAIT_FLIPPED` | If device supports flipped portrait orientation. |
|
|
34
|
+
| `ORIENTATION_AUTO` | If device supports auto orientation. |
|
|
35
|
+
|
|
36
|
+
If you want to check if the device supports those capabilities, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
37
|
+
</details>
|
|
38
|
+
|
|
28
39
|
## Methods
|
|
29
40
|
|
|
30
41
|
### getBrightness()
|
|
@@ -43,6 +54,14 @@ interface IBrightness {
|
|
|
43
54
|
|
|
44
55
|
```
|
|
45
56
|
|
|
57
|
+
#### Return value
|
|
58
|
+
|
|
59
|
+
A promise that resolves to the current brightness settings.
|
|
60
|
+
|
|
61
|
+
#### Possible errors
|
|
62
|
+
|
|
63
|
+
If the brightness cannot be retrieved.
|
|
64
|
+
|
|
46
65
|
<Separator />
|
|
47
66
|
|
|
48
67
|
### getOrientation()
|
|
@@ -60,6 +79,21 @@ type Orientation = 'LANDSCAPE' | 'PORTRAIT' | 'LANDSCAPE_FLIPPED' | 'PORTRAIT_FL
|
|
|
60
79
|
|
|
61
80
|
```
|
|
62
81
|
|
|
82
|
+
#### Return value
|
|
83
|
+
|
|
84
|
+
A promise that resolves to the current screen orientation.
|
|
85
|
+
|
|
86
|
+
#### Possible errors
|
|
87
|
+
|
|
88
|
+
If the orientation cannot be retrieved.
|
|
89
|
+
|
|
90
|
+
#### Example
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
const orientation = (await sos.management.screen.getOrientation()).screenOrientation;
|
|
94
|
+
console.log(`Current screen orientation is: ${orientation}`);
|
|
95
|
+
```
|
|
96
|
+
|
|
63
97
|
<Separator />
|
|
64
98
|
|
|
65
99
|
### isPoweredOn()
|
|
@@ -70,25 +104,39 @@ The `isPoweredOn()` method returns whether the screen is on.
|
|
|
70
104
|
isPoweredOn(): Promise<boolean>;
|
|
71
105
|
```
|
|
72
106
|
|
|
107
|
+
#### Return value
|
|
108
|
+
|
|
109
|
+
A promise that resolves to a boolean indicating whether the screen is powered on.
|
|
110
|
+
|
|
111
|
+
#### Possible errors
|
|
112
|
+
|
|
113
|
+
If the power state cannot be retrieved.
|
|
114
|
+
|
|
73
115
|
<Separator />
|
|
74
116
|
|
|
75
117
|
### powerOff()
|
|
76
118
|
|
|
77
|
-
The `powerOff()` method
|
|
119
|
+
The `powerOff()` method turns the screen off. It will turn off the display backlight and the panel, and it will also disable the applet.
|
|
78
120
|
|
|
79
121
|
:::warning
|
|
80
|
-
|
|
81
|
-
On Android devices, `powerOff()` also shuts down the webview and the Applet. It's default Android behavior that cannot be changed. Once
|
|
122
|
+
On Android devices, `powerOff()` also shuts down the webview and the Applet. It's the default Android behavior that cannot be changed. Once
|
|
82
123
|
the Applet is off, you cannot call `powerOn()` to resume the playback.
|
|
83
124
|
|
|
84
125
|
To manage the display On/Off state, use [REST API Power Actions](https://developers.signageos.io/api/#tag/DevicePower-Actions) instead.
|
|
85
|
-
|
|
86
126
|
:::
|
|
87
127
|
|
|
88
128
|
```ts expandable
|
|
89
129
|
powerOff(): Promise<void>;
|
|
90
130
|
```
|
|
91
131
|
|
|
132
|
+
#### Return value
|
|
133
|
+
|
|
134
|
+
A promise that resolves when the screen is successfully turned off.
|
|
135
|
+
|
|
136
|
+
#### Possible errors
|
|
137
|
+
|
|
138
|
+
If the screen cannot be turned off.
|
|
139
|
+
|
|
92
140
|
<Separator />
|
|
93
141
|
|
|
94
142
|
### powerOn()
|
|
@@ -99,16 +147,22 @@ The `powerOn()` method turns the screen on.
|
|
|
99
147
|
powerOn(): Promise<void>;
|
|
100
148
|
```
|
|
101
149
|
|
|
150
|
+
#### Return value
|
|
151
|
+
|
|
152
|
+
A promise that resolves when the screen is successfully turned on.
|
|
153
|
+
|
|
154
|
+
#### Possible errors
|
|
155
|
+
|
|
156
|
+
If the screen cannot be turned on.
|
|
157
|
+
|
|
102
158
|
<Separator />
|
|
103
159
|
|
|
104
160
|
### resize()
|
|
105
161
|
|
|
106
|
-
The `resize()` method changes resolution and orientation of the display.
|
|
162
|
+
The `resize()` method changes the resolution and orientation of the display.
|
|
107
163
|
|
|
108
164
|
:::info
|
|
109
|
-
|
|
110
|
-
For Tizen, you have to provide `baseUrl` which points to the Core App for Tizen which will be downloaded to the device [Read more how to upload your Core Apps here.](https://docs.signageos.io/hc/en-us/articles/4405245195666).
|
|
111
|
-
|
|
165
|
+
For Tizen, you have to provide `baseUrl` which points to the Core App for Tizen, which will be downloaded to the device [Read more on how to upload your Core Apps here.](https://docs.signageos.io/hc/en-us/articles/4405245195666).
|
|
112
166
|
:::
|
|
113
167
|
|
|
114
168
|
```ts expandable
|
|
@@ -119,11 +173,24 @@ resize(baseUrl: string, orientation: string, resolution: string, currentVersion:
|
|
|
119
173
|
|
|
120
174
|
| Name | Type | Required | Description |
|
|
121
175
|
|--------------------|----------|------------------|--------------------------------------------------------------------------------------------------------------------------------------|
|
|
122
|
-
| `baseUrl` | `string` | <div>Yes</div> | SSSP & Tizen devices
|
|
176
|
+
| `baseUrl` | `string` | <div>Yes</div> | SSSP & Tizen devices require installing an orientation-specific Core App if you want to switch orientation to portrait or landscape. |
|
|
123
177
|
| `orientation` | `string` | <div>Yes</div> | Screen orientation |
|
|
124
178
|
| `resolution` | `string` | <div>Yes</div> | Where it applies (mainly SSSP 2/3) |
|
|
125
179
|
| `currentVersion` | `string` | <div>Yes</div> | Core App version |
|
|
126
|
-
| `videoOrientation` | `string` | <div>No</div> | If the video has different orientation than the HTML5 content
|
|
180
|
+
| `videoOrientation` | `string` | <div>No</div> | If the video has a different orientation than the HTML5 content |
|
|
181
|
+
|
|
182
|
+
#### Return value
|
|
183
|
+
|
|
184
|
+
A promise that resolves when the screen is successfully resized.
|
|
185
|
+
|
|
186
|
+
#### Possible errors
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
- If `baseUrl` is not a valid URL
|
|
190
|
+
- If `orientation` is not a valid orientation
|
|
191
|
+
- If `resolution` is not a valid resolution
|
|
192
|
+
- If `currentVersion` is not a valid string
|
|
193
|
+
- If `videoOrientation` is not a valid video orientation
|
|
127
194
|
|
|
128
195
|
#### Example
|
|
129
196
|
|
|
@@ -136,7 +203,7 @@ await sos.management.screen.resize(
|
|
|
136
203
|
"1.0.4"
|
|
137
204
|
);
|
|
138
205
|
|
|
139
|
-
// for all other supported
|
|
206
|
+
// for all other supported devices
|
|
140
207
|
await sos.management.screen.resize(
|
|
141
208
|
"",
|
|
142
209
|
"PORTRAIT",
|
|
@@ -155,7 +222,7 @@ await sos.management.screen.resize(
|
|
|
155
222
|
|
|
156
223
|
### setBrightness()
|
|
157
224
|
|
|
158
|
-
The `setBrightness()` method sets the brightness of the screen. It supports
|
|
225
|
+
The `setBrightness()` method sets the brightness of the screen. It supports two different brightness values for 2 time points in the day.
|
|
159
226
|
|
|
160
227
|
```ts expandable
|
|
161
228
|
setBrightness(timeFrom1: string, brightness1: number, timeFrom2: string, brightness2: number): Promise<void>;
|
|
@@ -170,31 +237,58 @@ setBrightness(timeFrom1: string, brightness1: number, timeFrom2: string, brightn
|
|
|
170
237
|
| `timeFrom2` | `string` | <div>Yes</div> | Time in the XX:XX format |
|
|
171
238
|
| `brightness2` | `number` | <div>Yes</div> | Brightness value between 0 and 100 |
|
|
172
239
|
|
|
240
|
+
#### Return value
|
|
241
|
+
|
|
242
|
+
A promise that resolves when the brightness is successfully set.
|
|
243
|
+
|
|
244
|
+
#### Possible errors
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
- If `timeFrom1` is not a valid time in the XX:XX format
|
|
248
|
+
- If `brightness1` is not a number between 0 and 100
|
|
249
|
+
- If `timeFrom2` is not a valid time in the XX:XX format
|
|
250
|
+
- If `brightness2` is not a number between 0 and 100
|
|
251
|
+
|
|
173
252
|
#### Example
|
|
174
253
|
|
|
175
254
|
```ts
|
|
255
|
+
// Set brightness to 10% between 00:00 and 17:00, and to 30% between 17:00 and 23:59
|
|
176
256
|
await sos.management.screen.setBrightness(
|
|
177
257
|
'00:00',
|
|
178
258
|
'10',
|
|
179
259
|
'17:00',
|
|
180
260
|
'30'
|
|
181
261
|
);
|
|
262
|
+
|
|
263
|
+
// Set brightness to 50% all day
|
|
264
|
+
await sos.management.screen.setBrightness(
|
|
265
|
+
00:00,
|
|
266
|
+
50,
|
|
267
|
+
23:59,
|
|
268
|
+
50
|
|
269
|
+
);
|
|
182
270
|
```
|
|
183
271
|
|
|
272
|
+
:::note[GitHub Example]
|
|
273
|
+
|
|
274
|
+
- [ Applet Example with Brightness setup](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/brightness/)
|
|
275
|
+
|
|
276
|
+
:::
|
|
277
|
+
|
|
184
278
|
<Separator />
|
|
185
279
|
|
|
186
280
|
### takeAndUploadScreenshot(uploadBaseUrl, computeHash)
|
|
187
281
|
|
|
188
|
-
The `takeAndUploadScreenshot()` method takes a screenshot and uploads it to a specified
|
|
189
|
-
(`https://upload.signageos.io`) or a dedicated server
|
|
282
|
+
The `takeAndUploadScreenshot()` method takes a screenshot and uploads it to a specified URL. This can be either a signageOS upload URL
|
|
283
|
+
(`https://upload.signageos.io`) or a dedicated server URL for uploading screenshots. The format in which the screenshot is uploaded may be
|
|
190
284
|
different for every platform.
|
|
191
285
|
|
|
192
286
|
To implement a custom screenshot upload server, it needs to implement these endpoints:
|
|
193
287
|
- POST `/upload/file?prefix=screenshot/` - Endpoint for receiving screenshot using form data, with the image set to the `file` field.
|
|
194
|
-
- POST `/upload/raw?prefix=screenshot/` - Endpoint for receiving screenshots as
|
|
195
|
-
- POST `/upload/image-data-uri?prefix=screenshot/` - Endpoint for receiving screenshots encoded as a data
|
|
288
|
+
- POST `/upload/raw?prefix=screenshot/` - Endpoint for receiving screenshots as raw data.
|
|
289
|
+
- POST `/upload/image-data-uri?prefix=screenshot/` - Endpoint for receiving screenshots encoded as a data URL.
|
|
196
290
|
|
|
197
|
-
signageOS provides standalone server
|
|
291
|
+
signageOS provides a standalone server that implements all of those methods. It is offered to all of our partners through the
|
|
198
292
|
[support ticketing system](https://box.signageos.io/support/).
|
|
199
293
|
|
|
200
294
|
```ts expandable
|
|
@@ -208,9 +302,20 @@ takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<{
|
|
|
208
302
|
|
|
209
303
|
| Name | Type | Required | Description |
|
|
210
304
|
|-----------------|-----------|------------------|---------------------------------------------------------------------------------------------------------------|
|
|
211
|
-
| `uploadBaseUrl` | `string` | <div>Yes</div> | URL to which the screenshot will be uploaded. It can be either a signageOS upload
|
|
305
|
+
| `uploadBaseUrl` | `string` | <div>Yes</div> | URL to which the screenshot will be uploaded. It can be either a signageOS upload URL or a custom server URL. |
|
|
212
306
|
| `computeHash` | `boolean` | <div>No</div> | Whether to compute a hash of the screenshot and return it in the response. |
|
|
213
307
|
|
|
308
|
+
#### Return value
|
|
309
|
+
|
|
310
|
+
A promise that resolves to an object containing the screenshot URL and optionally a hash of the screenshot.
|
|
311
|
+
|
|
312
|
+
#### Possible errors
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
- If `uploadBaseUrl` is not a valid URL
|
|
316
|
+
- If `computeHash` is not a boolean
|
|
317
|
+
- If the screenshot cannot be taken or uploaded.
|
|
318
|
+
|
|
214
319
|
#### Example
|
|
215
320
|
|
|
216
321
|
```ts
|
|
@@ -220,6 +325,12 @@ const { screenshotUrl, aHash } = await sos.management.screen.takeAndUploadScreen
|
|
|
220
325
|
);
|
|
221
326
|
```
|
|
222
327
|
|
|
328
|
+
:::note[GitHub Example]
|
|
329
|
+
|
|
330
|
+
- [ Applet Example with Screenshot Upload](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/screenshot-upload)
|
|
331
|
+
|
|
332
|
+
:::
|
|
333
|
+
|
|
223
334
|
<Separator />
|
|
224
335
|
|
|
225
336
|
### ~takeAndUploadScreenshot(uploadBaseUrl)~
|
|
@@ -4,18 +4,30 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# security
|
|
6
6
|
|
|
7
|
-
The `sos.management.security` API groups together methods for management of a security PIN code of the device.
|
|
7
|
+
The `sos.management.security` API groups together methods for the management of a security PIN code of the device.
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
11
|
### generateRandomPinCode()
|
|
12
12
|
|
|
13
|
-
The `
|
|
13
|
+
The `generateRandomPinCode()` generates a random 4-digit PIN code and sets it as the current PIN code.
|
|
14
14
|
|
|
15
15
|
```ts expandable
|
|
16
16
|
generateRandomPinCode(): Promise<void>;
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
#### Return value
|
|
20
|
+
|
|
21
|
+
A promise that resolves when the random PIN code is successfully set.
|
|
22
|
+
|
|
23
|
+
#### Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
await sos.management.security.generateRandomPinCode(); // Generate new random PIN code
|
|
27
|
+
const newPinCode = await sos.management.security.getPinCode(); // Get PIN code as string
|
|
28
|
+
console.log(newPinCode);
|
|
29
|
+
```
|
|
30
|
+
|
|
19
31
|
<Separator />
|
|
20
32
|
|
|
21
33
|
### getPinCode()
|
|
@@ -26,9 +38,20 @@ The `getPinCode()` method returns the currently set PIN code.
|
|
|
26
38
|
getPinCode(): Promise<string>;
|
|
27
39
|
```
|
|
28
40
|
|
|
41
|
+
#### Return value
|
|
42
|
+
|
|
43
|
+
A promise that resolves to the currently set PIN code.
|
|
44
|
+
|
|
29
45
|
#### Possible errors
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
Get PIN code failed because the PIN code has not been set yet.
|
|
48
|
+
|
|
49
|
+
#### Example
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const pinCode = await sos.management.security.getPinCode();
|
|
53
|
+
console.log(`Current PIN code is: ${pinCode}`);
|
|
54
|
+
```
|
|
32
55
|
|
|
33
56
|
<Separator />
|
|
34
57
|
|
|
@@ -36,6 +59,10 @@ getPinCode(): Promise<string>;
|
|
|
36
59
|
|
|
37
60
|
The `setPinCode()` method sets the pin code.
|
|
38
61
|
|
|
62
|
+
:::warning
|
|
63
|
+
The maximum length of the PIN code is four characters.
|
|
64
|
+
:::
|
|
65
|
+
|
|
39
66
|
```ts expandable
|
|
40
67
|
setPinCode(pinCode: string): Promise<void>;
|
|
41
68
|
```
|
|
@@ -46,8 +73,24 @@ setPinCode(pinCode: string): Promise<void>;
|
|
|
46
73
|
|-----------|----------|------------------|-------------------------|
|
|
47
74
|
| `pinCode` | `string` | <div>Yes</div> | The PIN code to be set. |
|
|
48
75
|
|
|
76
|
+
#### Return value
|
|
77
|
+
|
|
78
|
+
A promise that resolves when the PIN code is successfully set.
|
|
79
|
+
|
|
49
80
|
#### Possible errors
|
|
50
81
|
|
|
51
82
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
83
|
+
- Invalid PIN code format.
|
|
84
|
+
- PIN code 0000 is not allowed, use another PIN code.
|
|
85
|
+
|
|
86
|
+
#### Example
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
await sos.management.security.setPinCode("9999");
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
:::note[GitHub Example]
|
|
93
|
+
|
|
94
|
+
- [ Applet Example with PIN setup](https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/security-pin-code)
|
|
95
|
+
|
|
96
|
+
:::
|