@signageos/front-applet 8.0.2 → 8.1.0
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/fpath/index.md +1 -1
- package/docs/sos/browser.md +27 -17
- package/docs/sos/command.md +21 -9
- package/docs/sos/debug.md +17 -0
- package/docs/sos/deviceInfo.md +26 -0
- package/docs/sos/display.md +17 -0
- package/docs/sos/fileSystem.md +62 -1
- package/docs/sos/hardware/index.md +36 -1
- package/docs/sos/hardware/led.md +11 -0
- package/docs/sos/index.md +14 -12
- package/docs/sos/input.md +13 -0
- package/docs/sos/monitors.md +16 -1
- package/docs/sos/native/mdc.md +0 -9
- package/docs/sos/offline/index.md +0 -14
- package/docs/sos/osd.md +15 -0
- package/docs/sos/proofOfPlay.md +14 -21
- package/docs/sos/sync.md +3 -17
- package/docs/sos_management/audio.md +14 -1
- package/docs/sos_management/firmware.md +26 -0
- package/docs/sos_management/index.md +1 -1
- package/docs/sos_management/network.md +3 -3
- package/docs/sos_management/package.md +7 -16
- package/docs/sos_management/power.md +154 -1
- package/docs/sos_management/proxy.md +25 -0
- package/docs/sos_management/remoteControl.md +36 -0
- package/docs/sos_management/screen.md +35 -20
- package/docs/sos_management/time.md +45 -5
- package/docs/sos_management/wifi.md +82 -18
- package/es6/FrontApplet/DeviceInfo/IDeviceInfo.d.ts +1 -0
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +9 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js +13 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/FileSystem/IFileSystem.d.ts +1 -0
- package/es6/FrontApplet/FrontApplet.d.ts +8 -2
- package/es6/FrontApplet/FrontApplet.js +8 -2
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +14 -0
- package/es6/FrontApplet/Management/Firmware/Firmware.js +8 -0
- package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
- package/es6/FrontApplet/Management/Package/Package.d.ts +0 -8
- package/es6/FrontApplet/Management/Package/Package.js +0 -8
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/Power/IPower.d.ts +35 -0
- package/es6/FrontApplet/Management/Power/IPower.js +25 -0
- package/es6/FrontApplet/Management/Power/IPower.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +80 -2
- package/es6/FrontApplet/Management/Power/Power.js +125 -1
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Power/PowerHelper.d.ts +3 -0
- package/es6/FrontApplet/Management/Power/PowerHelper.js +12 -0
- package/es6/FrontApplet/Management/Power/PowerHelper.js.map +1 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +13 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.js +13 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +18 -0
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +18 -0
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/IScreen.d.ts +5 -0
- package/es6/FrontApplet/Management/Screen/Screen.d.ts +18 -2
- package/es6/FrontApplet/Management/Screen/Screen.js +32 -23
- package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
- package/es6/FrontApplet/Management/Time/Time.d.ts +15 -3
- package/es6/FrontApplet/Management/Time/Time.js +9 -0
- 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 +1 -0
- package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +56 -19
- package/es6/FrontApplet/Management/Wifi/Wifi.js +59 -20
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/es6/FrontApplet/Monitors/Monitors.d.ts +1 -1
- package/es6/FrontApplet/Monitors/Monitors.js +1 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +0 -10
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +0 -10
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
- package/es6/Monitoring/DeviceInfo/deviceInfoCommands.d.ts +29 -0
- package/es6/Monitoring/DeviceInfo/deviceInfoCommands.js +10 -0
- package/es6/Monitoring/DeviceInfo/deviceInfoCommands.js.map +1 -0
- package/es6/Monitoring/DeviceInfo/handleDeviceInfoRequests.d.ts +5 -0
- package/es6/Monitoring/DeviceInfo/handleDeviceInfoRequests.js +30 -0
- package/es6/Monitoring/DeviceInfo/handleDeviceInfoRequests.js.map +1 -0
- package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +21 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js +5 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js.map +1 -1
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +14 -0
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
- package/es6/Monitoring/Management/Power/handlePowerRequests.js +27 -0
- package/es6/Monitoring/Management/Power/handlePowerRequests.js.map +1 -1
- package/es6/Monitoring/Management/Power/powerCommands.d.ts +41 -1
- package/es6/Monitoring/Management/Power/powerCommands.js +9 -1
- package/es6/Monitoring/Management/Power/powerCommands.js.map +1 -1
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js +3 -1
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
- package/es6/Monitoring/Management/Screen/screenCommands.d.ts +2 -0
- package/es6/Monitoring/Management/Screen/screenCommands.js.map +1 -1
- package/es6/Monitoring/Monitoring.js +2 -0
- package/es6/Monitoring/Monitoring.js.map +1 -1
- package/es6/fpath.d.ts +1 -1
- package/es6/fpath.js +1 -1
- package/package.json +1 -1
|
@@ -6,15 +6,6 @@ sidebar_position: 0
|
|
|
6
6
|
|
|
7
7
|
The `sos.management.package` API groups together methods for installing custom Android packages.
|
|
8
8
|
|
|
9
|
-
```ts
|
|
10
|
-
await sos.management.package.install(
|
|
11
|
-
'https://cdn.your-cms.com',
|
|
12
|
-
'io.signageosWebView.app.ota',
|
|
13
|
-
'2.4.0',
|
|
14
|
-
'benq'
|
|
15
|
-
);
|
|
16
|
-
```
|
|
17
|
-
|
|
18
9
|
## Methods
|
|
19
10
|
|
|
20
11
|
### install()
|
|
@@ -34,13 +25,13 @@ install(baseUrl: string, packageName: string, version: string, build: string | n
|
|
|
34
25
|
| `version` | `string` | Package version |
|
|
35
26
|
| `build` | `string \| null` | If relevant for your device |
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
## API Example
|
|
38
29
|
|
|
39
30
|
```ts
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
import { sos } from '@signageos/front-applet';
|
|
32
|
+
|
|
33
|
+
void sos.onReady(async () => {
|
|
34
|
+
await sos.management.package.install('https://cdn.your-cms.com', 'io.signageosWebView.app.ota', '2.4.0', 'benq');
|
|
35
|
+
});
|
|
36
|
+
|
|
46
37
|
```
|
|
@@ -17,6 +17,28 @@ The `appRestart()` method initializes a restart of the signageOS app.
|
|
|
17
17
|
appRestart(): Promise<void>;
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
#### Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
await sos.management.power.appRestart();
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
<Separator />
|
|
27
|
+
|
|
28
|
+
### clearScheduledReboots()
|
|
29
|
+
|
|
30
|
+
Removes all scheduled reboot rules from the device.
|
|
31
|
+
|
|
32
|
+
```ts expandable
|
|
33
|
+
clearScheduledReboots(): Promise<void>;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Example
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
await sos.management.power.clearScheduledReboots();
|
|
40
|
+
```
|
|
41
|
+
|
|
20
42
|
<Separator />
|
|
21
43
|
|
|
22
44
|
### getProprietaryTimers()
|
|
@@ -36,6 +58,39 @@ interface IProprietaryTimer {
|
|
|
36
58
|
|
|
37
59
|
```
|
|
38
60
|
|
|
61
|
+
#### Example
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
const timers = await sos.management.power.getProprietaryTimers();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
<Separator />
|
|
68
|
+
|
|
69
|
+
### getScheduledReboots()
|
|
70
|
+
|
|
71
|
+
Returns all scheduled reboot rules on the device.
|
|
72
|
+
|
|
73
|
+
```ts expandable
|
|
74
|
+
getScheduledReboots(): Promise<IScheduledRebootActions[]>;
|
|
75
|
+
// show-more
|
|
76
|
+
interface IScheduledRebootActions {
|
|
77
|
+
id: string;
|
|
78
|
+
rule: IScheduledRebootRule;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface IScheduledRebootRule {
|
|
82
|
+
weekdays: number[] | string[];
|
|
83
|
+
time: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### Example
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
await sos.management.power.getScheduledReboots();
|
|
92
|
+
```
|
|
93
|
+
|
|
39
94
|
<Separator />
|
|
40
95
|
|
|
41
96
|
### getTimers()
|
|
@@ -55,6 +110,38 @@ interface ITimer {
|
|
|
55
110
|
|
|
56
111
|
```
|
|
57
112
|
|
|
113
|
+
#### Example
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
const timers = await sos.management.power.getTimers();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
<Separator />
|
|
120
|
+
|
|
121
|
+
### removeScheduledReboot()
|
|
122
|
+
|
|
123
|
+
Removes scheduled reboot rule from the device.
|
|
124
|
+
|
|
125
|
+
```ts expandable
|
|
126
|
+
removeScheduledReboot(id: string): Promise<void>;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### Params
|
|
130
|
+
|
|
131
|
+
| Name | Type | Description |
|
|
132
|
+
|------|----------|---------------------------------|
|
|
133
|
+
| `id` | `string` | - ID of the rule to be removed. |
|
|
134
|
+
|
|
135
|
+
#### Example
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
// Get scheduled reboots
|
|
139
|
+
const scheduledReboots = await sos.management.power.getScheduledReboots();
|
|
140
|
+
|
|
141
|
+
// Remove scheduled reboot
|
|
142
|
+
await sos.management.power.removeScheduledReboot(scheduledReboots[0].id);
|
|
143
|
+
```
|
|
144
|
+
|
|
58
145
|
<Separator />
|
|
59
146
|
|
|
60
147
|
### setProprietaryTimer()
|
|
@@ -76,6 +163,48 @@ setProprietaryTimer(type: ProprietaryTimerType, timeOn: string | null, timeOff:
|
|
|
76
163
|
| `weekdays` | `string[]` | The days of the week when the timer should be active (`mon`, ..., `sun`). |
|
|
77
164
|
| `keepAppletRunning` *(optional)* | `boolean` | If `true`, the applet will be kept running when the timer is active on certain devices. |
|
|
78
165
|
|
|
166
|
+
#### Example
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
await sos.management.power.setProprietaryTimer("TIMER_20", "08:00", "22:00", ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], 30);
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
<Separator />
|
|
173
|
+
|
|
174
|
+
### setScheduledReboot()
|
|
175
|
+
|
|
176
|
+
Schedule automatic reboot on the device. Calling this function will create one rule.
|
|
177
|
+
It is possible to set multiple rules, which can be later obtained by `getScheduledReboots` function.
|
|
178
|
+
|
|
179
|
+
:::note
|
|
180
|
+
- Setting new scheduled reboot on device might take up to 10 minutes to show in Box.
|
|
181
|
+
- Every new scheduled reboot rule gets unique identifier generated by device, it might be later returned by `getScheduledReboots()`.
|
|
182
|
+
:::
|
|
183
|
+
|
|
184
|
+
```ts expandable
|
|
185
|
+
setScheduledReboot(weekdays: WeekdayType[], time: string): Promise<void>;
|
|
186
|
+
// show-more
|
|
187
|
+
type WeekdayType = 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Params
|
|
192
|
+
|
|
193
|
+
| Name | Type | Description |
|
|
194
|
+
|------------|-----------------|------------------------------------------------------------------|
|
|
195
|
+
| `weekdays` | `WeekdayType[]` | |
|
|
196
|
+
| `time` | `string` | - Time when the reboot should be executed. Format is `HH:mm:ss`. |
|
|
197
|
+
|
|
198
|
+
#### Example
|
|
199
|
+
|
|
200
|
+
```ts
|
|
201
|
+
// Schedule reboot every Monday at 3:00 AM
|
|
202
|
+
await sos.management.power.setScheduledReboot(["MONDAY"], "03:00:00");
|
|
203
|
+
|
|
204
|
+
// Schedule reboot every Monday and Friday at 7:30 PM / 19:30
|
|
205
|
+
await sos.management.power.setScheduledReboot(["MONDAY", "FRIDAY"], "19:30:00");
|
|
206
|
+
```
|
|
207
|
+
|
|
79
208
|
<Separator />
|
|
80
209
|
|
|
81
210
|
### setTimer()
|
|
@@ -96,6 +225,12 @@ setTimer(type: keyof typeof TimerType, timeOn: string | null, timeOff: string |
|
|
|
96
225
|
| `weekdays` | `string[]` | The days of the week when the timer should be active (`mon`, ..., `sun`). |
|
|
97
226
|
| `volume` | `number` | The volume level set when the device is turned on. |
|
|
98
227
|
|
|
228
|
+
#### Example
|
|
229
|
+
|
|
230
|
+
```ts
|
|
231
|
+
await sos.management.power.setTimer("TIMER_1", "08:00", "22:00", ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], 30);
|
|
232
|
+
```
|
|
233
|
+
|
|
99
234
|
<Separator />
|
|
100
235
|
|
|
101
236
|
### systemReboot()
|
|
@@ -106,6 +241,12 @@ The `systemReboot()` method initializes a system reboot.
|
|
|
106
241
|
systemReboot(): Promise<void>;
|
|
107
242
|
```
|
|
108
243
|
|
|
244
|
+
#### Example
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
await sos.management.power.systemReboot();
|
|
248
|
+
```
|
|
249
|
+
|
|
109
250
|
<Separator />
|
|
110
251
|
|
|
111
252
|
### unsetProprietaryTimer()
|
|
@@ -123,6 +264,12 @@ unsetProprietaryTimer(type: ProprietaryTimerType): Promise<void>;
|
|
|
123
264
|
|--------|---------------------|----------------------------------------------------|
|
|
124
265
|
| `type` | ``TIMER_${number}`` | The type of the timer (`TIMER_1`, ..., `TIMER_7`). |
|
|
125
266
|
|
|
267
|
+
#### Example
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
await sos.management.power.unsetProprietaryTimer("TIMER_2");
|
|
271
|
+
```
|
|
272
|
+
|
|
126
273
|
<Separator />
|
|
127
274
|
|
|
128
275
|
### unsetTimer()
|
|
@@ -137,4 +284,10 @@ unsetTimer(type: keyof typeof TimerType): Promise<void>;
|
|
|
137
284
|
|
|
138
285
|
| Name | Type | Description |
|
|
139
286
|
|--------|-------------------------------------------------------------------------------------------|----------------------------------------------------|
|
|
140
|
-
| `type` | `"TIMER_1" \| "TIMER_2" \| "TIMER_3" \| "TIMER_4" \| "TIMER_5" \| "TIMER_6" \| "TIMER_7"` | The type of the timer (`TIMER_1`, ..., `TIMER_7`). |
|
|
287
|
+
| `type` | `"TIMER_1" \| "TIMER_2" \| "TIMER_3" \| "TIMER_4" \| "TIMER_5" \| "TIMER_6" \| "TIMER_7"` | The type of the timer (`TIMER_1`, ..., `TIMER_7`). |
|
|
288
|
+
|
|
289
|
+
#### Example
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
await sos.management.power.unsetTimer("TIMER_2");
|
|
293
|
+
```
|
|
@@ -14,6 +14,12 @@ The `disable()` method disables the proxy on the device.
|
|
|
14
14
|
disable(): Promise<void>;
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
#### Example
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
await sos.management.proxy.disable();
|
|
21
|
+
```
|
|
22
|
+
|
|
17
23
|
<Separator />
|
|
18
24
|
|
|
19
25
|
### getConnectedTo()
|
|
@@ -24,6 +30,13 @@ The `getConnectedTo()` methods returns the current connected proxy server uri on
|
|
|
24
30
|
getConnectedTo(): Promise<string>;
|
|
25
31
|
```
|
|
26
32
|
|
|
33
|
+
#### Example
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
const uri = await sos.management.proxy.getConnectedTo();
|
|
37
|
+
console.log(uri); // 178.62.193.192
|
|
38
|
+
```
|
|
39
|
+
|
|
27
40
|
<Separator />
|
|
28
41
|
|
|
29
42
|
### isEnabled()
|
|
@@ -34,6 +47,12 @@ The `isEnabled()` method returns whether the proxy is enabled on the device.
|
|
|
34
47
|
isEnabled(): Promise<boolean>;
|
|
35
48
|
```
|
|
36
49
|
|
|
50
|
+
#### Example
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
const enabled = await sos.management.proxy.isEnabled();
|
|
54
|
+
```
|
|
55
|
+
|
|
37
56
|
<Separator />
|
|
38
57
|
|
|
39
58
|
### setManual()
|
|
@@ -42,4 +61,10 @@ The `setManual()` method sets the proxy on the device.
|
|
|
42
61
|
|
|
43
62
|
```ts expandable
|
|
44
63
|
setManual(uri: string, port: number, username?: string, password?: string): Promise<void>;
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Example
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
const enabled = await sos.management.proxy.setManual('178.62.193.192', 1080, 'username', 'password');
|
|
45
70
|
```
|
|
@@ -16,6 +16,12 @@ The `disable()` method disables remote control.
|
|
|
16
16
|
disable(): Promise<void>;
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
#### Example
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
await sos.management.remoteControl.disable();
|
|
23
|
+
```
|
|
24
|
+
|
|
19
25
|
<Separator />
|
|
20
26
|
|
|
21
27
|
### enable()
|
|
@@ -35,6 +41,12 @@ Always set the Remote Control Lock to `enable` after the deployment.
|
|
|
35
41
|
enable(): Promise<void>;
|
|
36
42
|
```
|
|
37
43
|
|
|
44
|
+
#### Example
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
await sos.management.remoteControl.enable();
|
|
48
|
+
```
|
|
49
|
+
|
|
38
50
|
<Separator />
|
|
39
51
|
|
|
40
52
|
### isEnabled()
|
|
@@ -45,6 +57,12 @@ The `isEnabled()` method returns whether the remote control is enabled.
|
|
|
45
57
|
isEnabled(): Promise<boolean>;
|
|
46
58
|
```
|
|
47
59
|
|
|
60
|
+
#### Example
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
const enabled = await sos.management.remoteControl.isEnabled();
|
|
64
|
+
```
|
|
65
|
+
|
|
48
66
|
<Separator />
|
|
49
67
|
|
|
50
68
|
### isLocked()
|
|
@@ -55,6 +73,12 @@ The `isLocked()` method returns whether the remote control is locked (disabled).
|
|
|
55
73
|
isLocked(): Promise<boolean>;
|
|
56
74
|
```
|
|
57
75
|
|
|
76
|
+
#### Example
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
const locked = await sos.management.remoteControl.isLocked();
|
|
80
|
+
```
|
|
81
|
+
|
|
58
82
|
<Separator />
|
|
59
83
|
|
|
60
84
|
### lock()
|
|
@@ -65,6 +89,12 @@ The `lock()` method is an alias for the `disable()` method.
|
|
|
65
89
|
lock(): Promise<void>;
|
|
66
90
|
```
|
|
67
91
|
|
|
92
|
+
#### Example
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
await sos.management.remoteControl.lock();
|
|
96
|
+
```
|
|
97
|
+
|
|
68
98
|
<Separator />
|
|
69
99
|
|
|
70
100
|
### unlock()
|
|
@@ -73,4 +103,10 @@ The `unlock()` method is an alias for the `enable()` method.
|
|
|
73
103
|
|
|
74
104
|
```ts expandable
|
|
75
105
|
unlock(): Promise<void>;
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### Example
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
await sos.management.remoteControl.unlock();
|
|
76
112
|
```
|
|
@@ -25,24 +25,6 @@ There is a specific behavior based on the device type you operate:
|
|
|
25
25
|
|
|
26
26
|
:::
|
|
27
27
|
|
|
28
|
-
```ts
|
|
29
|
-
// for Tizen
|
|
30
|
-
await sos.management.screen.resize(
|
|
31
|
-
"https://cdn.your-cms.com/tizen/1.0.4",
|
|
32
|
-
"PORTRAIT",
|
|
33
|
-
"FULL_READY",
|
|
34
|
-
"1.0.4"
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
// for all other supported device
|
|
38
|
-
await sos.management.screen.resize(
|
|
39
|
-
"",
|
|
40
|
-
"PORTRAIT",
|
|
41
|
-
"HD_READY",
|
|
42
|
-
""
|
|
43
|
-
);
|
|
44
|
-
```
|
|
45
|
-
|
|
46
28
|
## Methods
|
|
47
29
|
|
|
48
30
|
### getBrightness()
|
|
@@ -92,7 +74,7 @@ isPoweredOn(): Promise<boolean>;
|
|
|
92
74
|
|
|
93
75
|
### powerOff()
|
|
94
76
|
|
|
95
|
-
The `powerOff()` method turn the screen off.
|
|
77
|
+
The `powerOff()` method turn the screen off. It will turn off the display backlight and the panel, and it will also disable applet.
|
|
96
78
|
|
|
97
79
|
:::warning
|
|
98
80
|
|
|
@@ -201,7 +183,7 @@ await sos.management.screen.setBrightness(
|
|
|
201
183
|
|
|
202
184
|
<Separator />
|
|
203
185
|
|
|
204
|
-
### takeAndUploadScreenshot()
|
|
186
|
+
### takeAndUploadScreenshot(uploadBaseUrl, computeHash)
|
|
205
187
|
|
|
206
188
|
The `takeAndUploadScreenshot()` method takes a screenshot and uploads it to a specified url. This can be either a signageOS upload url
|
|
207
189
|
(`https://upload.signageos.io`) or a dedicated server url for uploading screenshots. Format in which the screenshot is uploaded may be
|
|
@@ -215,6 +197,39 @@ To implement a custom screenshot upload server, it needs to implement these endp
|
|
|
215
197
|
signageOS provides standalone server which is implements all of those methods. It is provided to all of our partners through the
|
|
216
198
|
[support ticketing system](https://box.signageos.io/support/).
|
|
217
199
|
|
|
200
|
+
```ts expandable
|
|
201
|
+
takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<{
|
|
202
|
+
screenshotUrl: string;
|
|
203
|
+
aHash?: string;
|
|
204
|
+
}>;
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
#### Params
|
|
208
|
+
|
|
209
|
+
| Name | Type | Description |
|
|
210
|
+
|----------------------------|-----------|---------------------------------------------------------------------------------------------------------------|
|
|
211
|
+
| `uploadBaseUrl` | `string` | URL to which the screenshot will be uploaded. It can be either a signageOS upload url or a custom server url. |
|
|
212
|
+
| `computeHash` *(optional)* | `boolean` | Whether to compute a hash of the screenshot and return it in the response. |
|
|
213
|
+
|
|
214
|
+
#### Example
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
const { screenshotUrl, aHash } = await sos.management.screen.takeAndUploadScreenshot(
|
|
218
|
+
'https://your.upload.server/upload/file?prefix=screenshot/',
|
|
219
|
+
true,
|
|
220
|
+
);
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
<Separator />
|
|
224
|
+
|
|
225
|
+
### ~takeAndUploadScreenshot(uploadBaseUrl)~
|
|
226
|
+
|
|
227
|
+
:::danger Deprecated
|
|
228
|
+
|
|
229
|
+
This method was deprecated. Use `takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<{ screenshotUrl: string; aHash?: string }>` instead.
|
|
230
|
+
|
|
231
|
+
:::
|
|
232
|
+
|
|
218
233
|
```ts expandable
|
|
219
234
|
takeAndUploadScreenshot(uploadBaseUrl: string): Promise<string>;
|
|
220
235
|
```
|
|
@@ -27,11 +27,14 @@ interface IGetTime {
|
|
|
27
27
|
|
|
28
28
|
### setManual(dateTime, timezone)
|
|
29
29
|
|
|
30
|
-
The `setManual()` method sets the system time and the system timezone.
|
|
30
|
+
The `setManual()` method sets the system time and the system timezone and disables NTP server settings.
|
|
31
31
|
|
|
32
|
-
:::warning
|
|
32
|
+
:::warning Setting NTP server and timezone has side effects
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
- **Tizen**: After calling this API, display Reboots!
|
|
35
|
+
Tizen has limited set of available timezones. Read more here.
|
|
36
|
+
- **RaspberryPi**: After calling this API, RPi Reboots backend server which can take up to 60 seconds! During the reboot no JS API is
|
|
37
|
+
available. **Always wait for Promise resolution.**
|
|
35
38
|
|
|
36
39
|
:::
|
|
37
40
|
|
|
@@ -65,6 +68,15 @@ interface DateTime {
|
|
|
65
68
|
|
|
66
69
|
The `setNTP()` method sets the NTP server and the system timezone.
|
|
67
70
|
|
|
71
|
+
:::warning Setting NTP server and timezone has side effects
|
|
72
|
+
|
|
73
|
+
- **Tizen / WebOS**: After calling this API, display Reboots!
|
|
74
|
+
Tizen has limited set of available timezones. Read more here.
|
|
75
|
+
- **RaspberryPi**: After calling this API, RPi Reboots backend server which can take up to 60 seconds! During the reboot no JS API is
|
|
76
|
+
available. **Always wait for Promise resolution.**
|
|
77
|
+
|
|
78
|
+
:::
|
|
79
|
+
|
|
68
80
|
```ts expandable
|
|
69
81
|
setNTP(ntpServer: string, timezone: string): Promise<void>;
|
|
70
82
|
```
|
|
@@ -80,7 +92,7 @@ setNTP(ntpServer: string, timezone: string): Promise<void>;
|
|
|
80
92
|
|
|
81
93
|
### ~set()~
|
|
82
94
|
|
|
83
|
-
:::danger
|
|
95
|
+
:::danger Deprecated
|
|
84
96
|
|
|
85
97
|
This method was deprecated. Use `setManual(dateTime, timezone)` instead.
|
|
86
98
|
|
|
@@ -94,7 +106,7 @@ set(currentDate: Date, timezone: string): Promise<void>;
|
|
|
94
106
|
|
|
95
107
|
### ~setManual(currentDate, timezone)~
|
|
96
108
|
|
|
97
|
-
:::danger
|
|
109
|
+
:::danger Deprecated
|
|
98
110
|
|
|
99
111
|
This method was deprecated. Use `setManual(dateTime, timezone)` instead.
|
|
100
112
|
|
|
@@ -102,4 +114,32 @@ This method was deprecated. Use `setManual(dateTime, timezone)` instead.
|
|
|
102
114
|
|
|
103
115
|
```ts expandable
|
|
104
116
|
setManual(currentDate: Date, timezone: string): Promise<void>;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## API Example
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
import { sos } from '@signageos/front-applet';
|
|
123
|
+
|
|
124
|
+
void sos.onReady(async () => {
|
|
125
|
+
const { currentDate, timezone, ntpServer } = await sos.management.time.get();
|
|
126
|
+
console.log({ currentDate, timezone, ntpServer });
|
|
127
|
+
|
|
128
|
+
// Set the time without a ntp server
|
|
129
|
+
await sos.management.time.setManual(
|
|
130
|
+
{
|
|
131
|
+
year: 2025,
|
|
132
|
+
month: 5,
|
|
133
|
+
day: 23,
|
|
134
|
+
hour: 13,
|
|
135
|
+
minute: 0,
|
|
136
|
+
second: 0,
|
|
137
|
+
},
|
|
138
|
+
'Europe/Amsterdam',
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
// Set the time with a ntp server
|
|
142
|
+
await sos.management.time.setNTP('pool.ntp.org', 'Europe/Amsterdam');
|
|
143
|
+
});
|
|
144
|
+
|
|
105
145
|
```
|