@signageos/front-applet 6.1.1 → 6.2.1
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/CHANGELOG.md +10 -0
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/{js-api/js-applet-basics.md → applet-basics.md} +37 -98
- package/docs/index.md +97 -0
- package/docs/js-api/js-applet-resources.md +10 -28
- package/docs/js-api/js-browser.md +15 -30
- package/docs/js-api/js-command.md +33 -91
- package/docs/js-api/{js-api-debug.md → js-debug.md} +2 -3
- package/docs/js-api/js-device-info.md +4 -5
- package/docs/js-api/js-display.md +5 -7
- package/docs/js-api/js-file-system.md +13 -14
- package/docs/js-api/{js-loading-fonts.md → js-fonts.md} +21 -44
- package/docs/js-api/js-hardware.md +6 -9
- package/docs/js-api/js-iframes.md +3 -3
- package/docs/js-api/js-input.md +2 -3
- package/docs/js-api/js-offline-cache-media-files.md +26 -83
- package/docs/js-api/js-offline-cache-simple-data.md +11 -16
- package/docs/js-api/js-osd.md +0 -2
- package/docs/js-api/js-proof-of-play.md +4 -6
- package/docs/js-api/js-sensors.md +1 -1
- package/docs/js-api/{js-hardware-serial.md → js-serial.md} +12 -17
- package/docs/js-api/js-sync-playback.md +30 -70
- package/docs/js-api/js-video-inputs-internal-ports.md +15 -33
- package/docs/js-api/js-video-stream.md +49 -85
- package/docs/js-api/js-video.md +25 -75
- package/docs/management-api/{10-js-management-application.md → js-management-application.md} +16 -32
- package/docs/management-api/{7-js-management-volume.md → js-management-audio.md} +4 -6
- package/docs/management-api/{9-js-management-debug.md → js-management-debug.md} +5 -18
- package/docs/management-api/{2-js-management-firmware.md → js-management-firmware.md} +11 -25
- package/docs/management-api/{1-js-management.md → js-management-management.md} +8 -37
- package/docs/{js-api/js-monitoring-commands.md → management-api/js-management-monitoring-commands.md} +5 -6
- package/docs/{js-api/js-monitors.md → management-api/js-management-monitors.md} +9 -9
- package/docs/management-api/{11-js-management-network.md → js-management-network.md} +14 -40
- package/docs/management-api/{2-js-management-os.md → js-management-os.md} +2 -3
- package/docs/management-api/{8-js-management-package.md → js-management-package.md} +4 -6
- package/docs/management-api/{4-js-management-power.md → js-management-power.md} +10 -15
- package/docs/management-api/{14-js-management-proxy.md → js-management-proxy.md} +4 -6
- package/docs/management-api/{3-js-management-remote-control.md → js-management-remote-control.md} +5 -20
- package/docs/management-api/{5-js-management-screen.md → js-management-screen.md} +27 -81
- package/docs/management-api/{12-js-management-security.md → js-management-security.md} +6 -9
- package/docs/management-api/{6-js-management-time.md → js-management-time.md} +19 -26
- package/docs/management-api/{13-js-management-wifi.md → js-management-wifi.md} +31 -40
- package/es6/FrontApplet/Management/Management.d.ts +2 -0
- package/es6/FrontApplet/Management/Management.js +17 -0
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Power.d.ts +1 -1
- package/es6/FrontApplet/Management/Power.js +3 -1
- package/es6/FrontApplet/Management/Power.js.map +1 -1
- package/package.json +1 -1
- package/docs/js-api/js-api-introduction.md +0 -91
|
@@ -16,7 +16,7 @@ Management API power allows you to reboot the system, restart the application an
|
|
|
16
16
|
|
|
17
17
|
## All methods
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
| Methods | Description | Supported since |
|
|
21
21
|
| ------ | ------ | ------------- |
|
|
22
22
|
| `systemReboot()` | Safely reboot device | 3.0.0 |
|
|
@@ -26,8 +26,7 @@ Management API power allows you to reboot the system, restart the application an
|
|
|
26
26
|
| `getTimers()` | List All Timers - when the device turns on and off based on the days in a week | 4.0.0 |
|
|
27
27
|
| `setProprietaryTimer()` | Create/Set Proprietary Timer - when the device turns on and off based on the days in a week | 5.10.0 |
|
|
28
28
|
| `unsetProprietaryTimer()` | Remove Proprietary Timer - when the device turns on and off based on the days in a week | 5.10.0 |
|
|
29
|
-
| `getProprietaryTimers()` | List All Proprietary Timers - when the device turns on and off based on the days in a week | 5.10.0
|
|
30
|
-
:::
|
|
29
|
+
| `getProprietaryTimers()` | List All Proprietary Timers - when the device turns on and off based on the days in a week | 5.10.0
|
|
31
30
|
|
|
32
31
|
## systemReboot()
|
|
33
32
|
Method `systemReboot()` will reboot a targeted device.
|
|
@@ -62,7 +61,7 @@ await sos.management.power.appRestart(); // Returns void
|
|
|
62
61
|
## setTimer()
|
|
63
62
|
Method `setTimer()` will set the time of the timer.
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
|
|
66
65
|
| Param | Type | Required |Description |
|
|
67
66
|
| -------------- | ----------------------| :-------: | ---------------------------- |
|
|
68
67
|
| `type` | TimerType | <div class="red">Yes</div> | 7 slots for your timers |
|
|
@@ -74,8 +73,7 @@ Method `setTimer()` will set the time of the timer.
|
|
|
74
73
|
| `weekdays` | TimerWeekday[] | <div class="red">Yes</div> | Weekdays when timer is applied |
|
|
75
74
|
|^^|^^|^^| `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat` |
|
|
76
75
|
| `volume` | Number | <div class="red">Yes</div> | Volume level set when the device/display is turned on |
|
|
77
|
-
|^^|^^|^^| `0` - `100`
|
|
78
|
-
:::
|
|
76
|
+
|^^|^^|^^| `0` - `100`
|
|
79
77
|
|
|
80
78
|
### Javascript example
|
|
81
79
|
```javascript
|
|
@@ -85,12 +83,11 @@ await sos.management.power.setTimer("TIMER_1", "09:00:00", "23:00:05", ["mon"],
|
|
|
85
83
|
## unsetTimer()
|
|
86
84
|
Method `unsetTimer()` will remove the timer.
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
|
|
89
87
|
| Param | Type | Required |Description |
|
|
90
88
|
| -------------- | ----------------------| :-------: | ---------------------------- |
|
|
91
89
|
| `type` | TimerType | <div class="red">Yes</div> | 7 slots for your timers |
|
|
92
|
-
|^^|^^|^^| `TIMER_1`, `TIMER_2`, `TIMER_3`, `TIMER_4`, `TIMER_5`, `TIMER_6`, `TIMER_7`
|
|
93
|
-
:::
|
|
90
|
+
|^^|^^|^^| `TIMER_1`, `TIMER_2`, `TIMER_3`, `TIMER_4`, `TIMER_5`, `TIMER_6`, `TIMER_7`
|
|
94
91
|
|
|
95
92
|
### Javascript example
|
|
96
93
|
```javascript
|
|
@@ -128,7 +125,7 @@ const timers = await sos.management.power.getTimers();
|
|
|
128
125
|
## setProprietaryTimer()
|
|
129
126
|
Method `setProprietaryTimer()` will set the time of the proprietary timer.
|
|
130
127
|
|
|
131
|
-
|
|
128
|
+
|
|
132
129
|
| Param | Type | Required |Description |
|
|
133
130
|
| -------------- | ----------------------| :-------: | ---------------------------- |
|
|
134
131
|
| `type` | TimerType | <div class="red">Yes</div> | Slots for your timers in format `TIMER_${number}` |
|
|
@@ -138,8 +135,7 @@ Method `setProprietaryTimer()` will set the time of the proprietary timer.
|
|
|
138
135
|
| `timeOff` | String or null | <div class="red">Yes</div> | When the display/screen should be turned off |
|
|
139
136
|
|^^|^^|^^| `00:00:00` - `23:59:00` |
|
|
140
137
|
| `weekdays` | TimerWeekday[] | <div class="red">Yes</div> | Weekdays when timer is applied |
|
|
141
|
-
|^^|^^|^^| `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`
|
|
142
|
-
:::
|
|
138
|
+
|^^|^^|^^| `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`
|
|
143
139
|
|
|
144
140
|
### Javascript example
|
|
145
141
|
```javascript
|
|
@@ -149,12 +145,11 @@ await sos.management.power.setProprietaryTimer("TIMER_105", "09:00:00", "23:00:0
|
|
|
149
145
|
## unsetProprietaryTimer()
|
|
150
146
|
Method `unsetProprietaryTimer()` will remove the proprietary timer.
|
|
151
147
|
|
|
152
|
-
|
|
148
|
+
|
|
153
149
|
| Param | Type | Required |Description |
|
|
154
150
|
| -------------- | ----------------------| :-------: | ---------------------------- |
|
|
155
151
|
| `type` | TimerType | <div class="red">Yes</div> | Slots for your timers in format `TIMER_${number}` |
|
|
156
|
-
|^^|^^|^^| `TIMER_1`, `TIMER_2`, `TIMER_3`, `TIMER_4`, `TIMER_5`, `TIMER_6`, `TIMER_XX`
|
|
157
|
-
:::
|
|
152
|
+
|^^|^^|^^| `TIMER_1`, `TIMER_2`, `TIMER_3`, `TIMER_4`, `TIMER_5`, `TIMER_6`, `TIMER_XX`
|
|
158
153
|
|
|
159
154
|
### Javascript example
|
|
160
155
|
```javascript
|
|
@@ -17,14 +17,13 @@ Proxy management API enables you to manage currently connected proxy on your dev
|
|
|
17
17
|
|
|
18
18
|
## All methods
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
| Method | Description | Supported since |
|
|
22
22
|
| ------------------ | ----------------------------------- | --------------- |
|
|
23
23
|
| `isEnabled()` | Get proxy setting state | 5.4 |
|
|
24
24
|
| `setManual()` | Set proxy using provides parameters | 5.4 |
|
|
25
25
|
| `disable()` | Disable proxy | 5.4 |
|
|
26
|
-
| `getConnectedTo()` | Get connected proxy uri | 5.4
|
|
27
|
-
:::
|
|
26
|
+
| `getConnectedTo()` | Get connected proxy uri | 5.4
|
|
28
27
|
|
|
29
28
|
## isEnabled()
|
|
30
29
|
Method `isEnabled()` returns the current state of a proxy on your device.
|
|
@@ -39,14 +38,13 @@ sos.management.proxy.isEnabled().then((isEnabled) => {
|
|
|
39
38
|
## setManual()
|
|
40
39
|
Method `setManual()` lets you set proxy settings on your device.
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
|
|
43
42
|
| Param | Type | Required | Value | Description |
|
|
44
43
|
| -------------- | -------| :------------------------: | ----------------- | ------------------------ |
|
|
45
44
|
| `uri` | String | <div class="red">Yes</div> | `178.62.193.192` | URI of the proxy server |
|
|
46
45
|
| `port` | Number | <div class="red">No</div> | `0` - `65353` | Port number |
|
|
47
46
|
| `username` | String | <div class="red">No</div> | `johndoe` | Username |
|
|
48
|
-
| `password` | String | <div class="red">No</div> | `superpass` | Password
|
|
49
|
-
:::
|
|
47
|
+
| `password` | String | <div class="red">No</div> | `superpass` | Password
|
|
50
48
|
|
|
51
49
|
### Javascript example
|
|
52
50
|
```javascript
|
package/docs/management-api/{3-js-management-remote-control.md → js-management-remote-control.md}
RENAMED
|
@@ -16,19 +16,16 @@ Remote control API allows you to enable, disable and check status of remote cont
|
|
|
16
16
|
|
|
17
17
|
## All methods
|
|
18
18
|
|
|
19
|
-
::: table-responsive
|
|
20
19
|
| Method | Description | Supported since |
|
|
21
|
-
| ------ | ------ |
|
|
20
|
+
| ------ | ------ | :-------------: |
|
|
22
21
|
| `enable()` | Enables IR Remote control allows you to operate the device with IR Remote control (available alias `unlock()`) | 3.0.0 |
|
|
23
22
|
| `disable()` | Disables IR Remote control allows you to operate the device with IR Remote control (available alias `lock()`) | 3.0.0 |
|
|
24
23
|
| `isEnabled()` | Check is the IR Remote control is enabled or not (available alias `isLocked()`) | 3.0.0 |
|
|
25
|
-
::: table-responsive
|
|
26
|
-
|
|
27
24
|
|
|
28
25
|
## enable()
|
|
29
26
|
Method `enable()` allows for a simple on state of remote control on your device.
|
|
30
27
|
|
|
31
|
-
:::
|
|
28
|
+
:::danger
|
|
32
29
|
**Android Devices Attention Required:**
|
|
33
30
|
In order to prevent Android from displaying 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.
|
|
34
31
|
|
|
@@ -40,21 +37,9 @@ await sos.management.remoteControl.enable(); // Returns void
|
|
|
40
37
|
// or await sos.management.remoteControl.unlock();
|
|
41
38
|
```
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div>
|
|
47
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
48
|
-
<i class="fab fa-github svg-black"></i>
|
|
49
|
-
</div>
|
|
50
|
-
<div>
|
|
51
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Enable remote control on device</h3>
|
|
52
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</a>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
40
|
+
:::note[GitHub Example]
|
|
41
|
+
[Enable remote control on device](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/remote/)
|
|
42
|
+
:::
|
|
58
43
|
|
|
59
44
|
## disable()
|
|
60
45
|
Method `disable()` allows for a simple off state of remote control on your device.
|
|
@@ -14,12 +14,12 @@ description: "[Management JS API] Management API screen allows for manipulation
|
|
|
14
14
|
# Screen
|
|
15
15
|
Management API screen allows for manipulation with screen resolution, orientation, content, set displays brightness, retrieve current brightness of your display and manipulate with the power mode. It enables you to turn display on, off and check whether the display is on/off.
|
|
16
16
|
|
|
17
|
-
:::
|
|
17
|
+
:::warning
|
|
18
18
|
This method turns on/off only display/backlight. It will **not** set any power-safe mode. We strongly recommend to
|
|
19
19
|
reboot any device once a day.
|
|
20
20
|
:::
|
|
21
21
|
|
|
22
|
-
:::
|
|
22
|
+
:::info
|
|
23
23
|
There is a specific behavior based on the device type you operate:
|
|
24
24
|
**On SoC displays** (e.g. Samsung Tizen, LG webOS, Android-based SoC displays from Sony, Vestel Philips,...)
|
|
25
25
|
- `powerOn()` and `powerOff()` are turning the display backlight and the panel off
|
|
@@ -31,9 +31,8 @@ There is a specific behavior based on the device type you operate:
|
|
|
31
31
|
|
|
32
32
|
## All methods
|
|
33
33
|
|
|
34
|
-
::: table-responsive
|
|
35
34
|
| Method | Description | Supported since |
|
|
36
|
-
| ------ | ------ |
|
|
35
|
+
| ------ | ------ | :-------------: |
|
|
37
36
|
| `resize()` | Set screen settings like resolution, orientation and video orientation | 3.0.0 |
|
|
38
37
|
| `getOrientation()` | Get screen orientation | 4.7.0 |
|
|
39
38
|
| `setBrightness()` | Set screen brightness | 3.0.0 |
|
|
@@ -42,13 +41,10 @@ There is a specific behavior based on the device type you operate:
|
|
|
42
41
|
| `powerOff()` | Turn `OFF` the display (only the display, except Android devices where it turns off the webview as well) | 3.0.0 |
|
|
43
42
|
| `isPoweredOn()` | Check the display status | 3.0.0 |
|
|
44
43
|
| `takeAndUploadScreenshot()` | Takes screenshot from the device and upload it to server | 3.0.0 |
|
|
45
|
-
:::
|
|
46
|
-
|
|
47
44
|
|
|
48
45
|
## resize()
|
|
49
46
|
Method `resize()` helps you manipulate with several aspects of your displays screen settings.
|
|
50
47
|
|
|
51
|
-
::: table-responsive
|
|
52
48
|
| Param |Type | Required | Description |
|
|
53
49
|
| -------------- | -------------------| :----------: | -------------------- |
|
|
54
50
|
| `baseUrl` | String | <div class="red">Yes</div> | SSSP & Tizen devices requires to install a orientation-specific Core App if you want to switch orientation to portrait or landscape. |
|
|
@@ -60,10 +56,9 @@ Method `resize()` helps you manipulate with several aspects of your displays scr
|
|
|
60
56
|
| `currentVersion` | String | <div class="red">Yes</div> | Core App version |
|
|
61
57
|
|^^|^^|^^| `1.0.4` |
|
|
62
58
|
| `videoOrientation` | VideoOrientation | <div class="red">Yes</div> | If the video has different orientation than the HTML5 content |
|
|
63
|
-
|^^|^^|^^| `LANDSCAPE`, `PORTRAIT`
|
|
64
|
-
:::
|
|
59
|
+
|^^|^^|^^| `LANDSCAPE`, `PORTRAIT`
|
|
65
60
|
|
|
66
|
-
:::
|
|
61
|
+
:::info
|
|
67
62
|
For Tizen, you have to provide `baseUrl` which points to your server where you uploaded previously built Core App for Tizen with your buiult-in Applet. [Read more how to upload your Core Apps here.](https://docs.signageos.io/hc/en-us/articles/4405245195666).
|
|
68
63
|
:::
|
|
69
64
|
|
|
@@ -86,21 +81,10 @@ await sos.management.screen.resize(
|
|
|
86
81
|
);
|
|
87
82
|
```
|
|
88
83
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
94
|
-
<i class="fab fa-github svg-black"></i>
|
|
95
|
-
</div>
|
|
96
|
-
<div>
|
|
97
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">How to resize screen on device</h3>
|
|
98
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
</a>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
84
|
+
:::note[GitHub Example]
|
|
85
|
+
[How to resize screen on device](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/resize/)
|
|
86
|
+
:::
|
|
87
|
+
|
|
104
88
|
|
|
105
89
|
## getOrientation()
|
|
106
90
|
Method `getOrientation()` lets you check current orientation of the screen. Possible values are listed in the table above.
|
|
@@ -113,7 +97,7 @@ await sos.management.screen.getOrientation();
|
|
|
113
97
|
## setBrightness()
|
|
114
98
|
Function `setBrightness()` lets you control the power of brightness emmited by your device and even set different brightness during the day.
|
|
115
99
|
|
|
116
|
-
|
|
100
|
+
|
|
117
101
|
| Param |Type | Required | Description |
|
|
118
102
|
| -------------- | ---------------------| :--------: | --------------------- |
|
|
119
103
|
| `timeFrom1` | String | <div class="red">Yes</div> | Day time since `brightness1` value will be applied (eg. 06:00, 24hour values) |
|
|
@@ -123,8 +107,7 @@ Function `setBrightness()` lets you control the power of brightness emmited by y
|
|
|
123
107
|
| `timeFrom2` | String | <div class="red">Yes</div> | Day time since `brightness2` value will be applied (eg. 22:00, 24hour values) |
|
|
124
108
|
|^^|^^|^^| Example: `00:00` - `23:59` |
|
|
125
109
|
| `brightness2` | Number | <div class="red">Yes</div> | Brightness level `0-100` |
|
|
126
|
-
|^^|^^|^^| Example: `0` - `100`
|
|
127
|
-
:::
|
|
110
|
+
|^^|^^|^^| Example: `0` - `100`
|
|
128
111
|
|
|
129
112
|
### Javascript example
|
|
130
113
|
```javascript
|
|
@@ -136,21 +119,9 @@ await sos.management.screen.setBrightness(
|
|
|
136
119
|
);
|
|
137
120
|
```
|
|
138
121
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<div>
|
|
143
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
144
|
-
<i class="fab fa-github svg-black"></i>
|
|
145
|
-
</div>
|
|
146
|
-
<div>
|
|
147
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">How change brightness on device</h3>
|
|
148
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
</a>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
122
|
+
:::note[GitHub Example]
|
|
123
|
+
[How change brightness on device](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/brightness/)
|
|
124
|
+
:::
|
|
154
125
|
|
|
155
126
|
## getBrightness()
|
|
156
127
|
Method `getBrightness()` lets you check the power of brightness emitted by your device.
|
|
@@ -177,26 +148,14 @@ Method `powerOn()` turns on the targeted display.
|
|
|
177
148
|
await sos.management.screen.powerOn(); // Returns void
|
|
178
149
|
```
|
|
179
150
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<div>
|
|
184
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
185
|
-
<i class="fab fa-github svg-black"></i>
|
|
186
|
-
</div>
|
|
187
|
-
<div>
|
|
188
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Management Display</h3>
|
|
189
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
</a>
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
151
|
+
:::note[GitHub Example]
|
|
152
|
+
[Management Display](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/display/)
|
|
153
|
+
:::
|
|
195
154
|
|
|
196
155
|
## powerOff()
|
|
197
156
|
Method `powerOff()` turns off the targeted display.
|
|
198
157
|
|
|
199
|
-
:::
|
|
158
|
+
:::warning
|
|
200
159
|
On Android devices, `powerOff()` also shuts down the webview and the Applet. It's default Android behavior that cannot be changed. Once the Applet is off, you cannot call `powerOn()` to resume the playback.
|
|
201
160
|
|
|
202
161
|
To manage the display On/Off state, use [REST API Power Actions](https://api.docs.signageos.io/#138035f6-af92-4345-8eaa-9c7f1ed0efd3) instead.
|
|
@@ -216,12 +175,11 @@ await sos.management.screen.isPoweredOn(); // Returns boolean
|
|
|
216
175
|
## takeAndUploadScreenshot()
|
|
217
176
|
Method `takeAndUploadScreenshot()` will upload a screenshot directly to the device.
|
|
218
177
|
|
|
219
|
-
|
|
178
|
+
|
|
220
179
|
| Param |Type | Required | Description |
|
|
221
180
|
| -------------- | ----------------------------- | :------: | ---------------------- |
|
|
222
181
|
| `uploadBaseUrl` | String | <div class="red">Yes</div>| Location of your Upload server for screenshots |
|
|
223
|
-
|^^|^^|^^| Example: `https://upload-screenshot.your-cms.com`
|
|
224
|
-
:::
|
|
182
|
+
|^^|^^|^^| Example: `https://upload-screenshot.your-cms.com`
|
|
225
183
|
|
|
226
184
|
### Javascript example
|
|
227
185
|
```javascript
|
|
@@ -230,25 +188,13 @@ await sos.management.screen.takeAndUploadScreenshot(
|
|
|
230
188
|
);
|
|
231
189
|
```
|
|
232
190
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
<div>
|
|
241
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Management Screenshot Upload</h3>
|
|
242
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
</a>
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
<br>
|
|
250
|
-
|
|
251
|
-
::: alert alert--warning
|
|
191
|
+
:::note[GitHub Example]
|
|
192
|
+
[Management Screenshot Upload](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/screenshot-upload)
|
|
193
|
+
:::
|
|
194
|
+
|
|
195
|
+
<br/>
|
|
196
|
+
|
|
197
|
+
:::warning
|
|
252
198
|
Open users (who is using screenshot capturing on device using JS API) have to run their own server for uploading screenshots. It differs for every platform! So it's not easy to achieve the unified output (screenshots url upload).
|
|
253
199
|
There are 2 options how to manage this:
|
|
254
200
|
|
|
@@ -17,13 +17,12 @@ Security management API allows you to manually set PIN code interfaces or get cu
|
|
|
17
17
|
|
|
18
18
|
## All methods
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
| Methods | Description | Supported since |
|
|
22
22
|
| ------ | -------- | :-------------: |
|
|
23
23
|
| `getPinCode()` | Get PIN code, 4 digits number string | 4.1 |
|
|
24
24
|
| `setPinCode()` | Set PIN code, 4 digits number string | 4.1 |
|
|
25
|
-
| `generateRandomPinCode()` | Generate 4 digits number string and set it as PIN code | 4.1
|
|
26
|
-
:::
|
|
25
|
+
| `generateRandomPinCode()` | Generate 4 digits number string and set it as PIN code | 4.1
|
|
27
26
|
|
|
28
27
|
## getPinCode()
|
|
29
28
|
Method `getPinCode()` will returns current PIN code, 4 digits number string.
|
|
@@ -36,11 +35,10 @@ await sos.management.security.getPinCode(); // Returns e.g. "1234"
|
|
|
36
35
|
Method `setPinCode()` will set the current PIN code, 4 digits number string.
|
|
37
36
|
PIN code `0000` is not allowed according to the default PIN after boot when the device is not connected to the internet!
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
|
|
40
39
|
| Param | Type | Required | Description |
|
|
41
40
|
| -------- | ------ | :----------: | ---------------------------------------------------------------------------------------------- |
|
|
42
|
-
| `pinCode` | String | <div class="red">Yes</div> | Set new PIN code
|
|
43
|
-
:::
|
|
41
|
+
| `pinCode` | String | <div class="red">Yes</div> | Set new PIN code
|
|
44
42
|
|
|
45
43
|
### Javascript example
|
|
46
44
|
```javascript
|
|
@@ -77,10 +75,9 @@ console.log(newPinCode);
|
|
|
77
75
|
## Errors
|
|
78
76
|
Although we are doing our best, following errors may occur when working with the Applet Resources.
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
|
|
81
79
|
| Code | Type | Message |
|
|
82
80
|
| ---- | ---- | ------- |
|
|
83
81
|
| 41701 | AppletSecurityError | Invalid PIN code (has to be 4 digits string) |
|
|
84
82
|
| 41702 | AppletSecurityError | Not allowed PIN code 0000, use another pin code |
|
|
85
|
-
| 41703 | AppletSecurityError | Get PIN code failed because was not set yet. Try to get PIN code later or set the PIN code using `setPinCode` method first.
|
|
86
|
-
:::
|
|
83
|
+
| 41703 | AppletSecurityError | Get PIN code failed because was not set yet. Try to get PIN code later or set the PIN code using `setPinCode` method first.
|
|
@@ -16,14 +16,13 @@ Management API time allows you to check your devices current time with a timezon
|
|
|
16
16
|
|
|
17
17
|
## All methods
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
| Method | Description | Supported since |
|
|
21
21
|
| ----------- | ------------------------------------------------- | :---------------: |
|
|
22
22
|
| `get()` | Get current time settings | 4.0.0 |
|
|
23
23
|
| `setManual()` | Set manual datetime and timezone | 4.0.0 |
|
|
24
24
|
| `setNTP()` | Configure NTP server and timezone | 4.0.0 |
|
|
25
|
-
| `set()` | Set manual datetime and timezone (**DEPRECATED**) | 4.0.0
|
|
26
|
-
:::
|
|
25
|
+
| `set()` | Set manual datetime and timezone (**DEPRECATED**) | 4.0.0
|
|
27
26
|
|
|
28
27
|
## get()
|
|
29
28
|
Method `get()` lets you check for current time with time zone.
|
|
@@ -49,7 +48,7 @@ const time = await sos.management.time.get();
|
|
|
49
48
|
</div>
|
|
50
49
|
</div>
|
|
51
50
|
|
|
52
|
-
<br
|
|
51
|
+
<br/>
|
|
53
52
|
|
|
54
53
|
### Example of response
|
|
55
54
|
|
|
@@ -75,20 +74,19 @@ When NTP is not set:
|
|
|
75
74
|
## set()
|
|
76
75
|
Method `set()` lets you set manual time and timezone of the device.
|
|
77
76
|
|
|
78
|
-
:::
|
|
77
|
+
:::warning
|
|
79
78
|
This method is deprecated. Use `setManual()` instead.
|
|
80
79
|
:::
|
|
81
80
|
|
|
82
|
-
:::
|
|
81
|
+
:::info
|
|
83
82
|
Calling `set()` will disable NTP server settings.
|
|
84
83
|
:::
|
|
85
84
|
|
|
86
|
-
|
|
85
|
+
|
|
87
86
|
| Param |Type | Required | Description |
|
|
88
87
|
| -------------- | ---------- | :---------: | ------------------- |
|
|
89
88
|
| `currentDate` | Date | <div class="red">Yes</div> | Datetime to set |
|
|
90
|
-
| `timezone` | String | <div class="red">Yes</div> | Timezone to set. Accepted values are timezone names from [timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
91
|
-
:::
|
|
89
|
+
| `timezone` | String | <div class="red">Yes</div> | Timezone to set. Accepted values are timezone names from [timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
92
90
|
|
|
93
91
|
### Javascript example
|
|
94
92
|
```javascript
|
|
@@ -97,29 +95,27 @@ const timezone = "Europe/Amsterdam";
|
|
|
97
95
|
await sos.management.time.set(currentDate, timezone);
|
|
98
96
|
```
|
|
99
97
|
|
|
100
|
-
:::
|
|
98
|
+
:::warning
|
|
101
99
|
Setting time and timezone has side effects:
|
|
102
100
|
|
|
103
101
|
| Platform | Side effect |
|
|
104
102
|
| ----------- | -------------------------------------------- |
|
|
105
103
|
| Tizen | After calling this API, display **Reboots**! |
|
|
106
104
|
| webOS | After calling this API, display **Reboots**! |
|
|
107
|
-
| RaspberryPi | After calling this API, RPi **Reboots backend server which can take up to 60 seconds**!<br /> During the reboot no JS API is available.<br />Always wait for Promise resolution.
|
|
108
|
-
:::
|
|
105
|
+
| RaspberryPi | After calling this API, RPi **Reboots backend server which can take up to 60 seconds**!<br /> During the reboot no JS API is available.<br />Always wait for Promise resolution.
|
|
109
106
|
|
|
110
107
|
## setManual()
|
|
111
108
|
Method `setManual()` lets you set manual time and timezone of the device.
|
|
112
109
|
|
|
113
|
-
:::
|
|
110
|
+
:::info
|
|
114
111
|
Calling `setManual()` will disable NTP server settings.
|
|
115
112
|
:::
|
|
116
113
|
|
|
117
|
-
|
|
114
|
+
|
|
118
115
|
| Param |Type | Required | Description |
|
|
119
116
|
| -------------- | ---------- | :---------: | ------------------- |
|
|
120
117
|
| `currentDate` | Date \| object | <div class="red">Yes</div> | Datetime to set |
|
|
121
|
-
| `timezone` | String | <div class="red">Yes</div> | Timezone to set. Accepted values are timezone names from [timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
122
|
-
:::
|
|
118
|
+
| `timezone` | String | <div class="red">Yes</div> | Timezone to set. Accepted values are timezone names from [timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
123
119
|
|
|
124
120
|
### Javascript example
|
|
125
121
|
```javascript
|
|
@@ -140,30 +136,28 @@ const timezone = "Europe/Amsterdam";
|
|
|
140
136
|
await sos.management.time.setManual(currentDate, timezone);
|
|
141
137
|
```
|
|
142
138
|
|
|
143
|
-
:::
|
|
139
|
+
:::warning
|
|
144
140
|
Calling this method with currentDate as Date is deprecated.
|
|
145
141
|
You should call it with datetime object instead. See example code.
|
|
146
142
|
:::
|
|
147
143
|
|
|
148
|
-
:::
|
|
144
|
+
:::warning
|
|
149
145
|
Setting time and timezone has side effects:
|
|
150
146
|
|
|
151
147
|
| Platform | Side effect |
|
|
152
148
|
| ----------- | -------------------------------------------- |
|
|
153
149
|
| Tizen | After calling this API, display **Reboots**! |
|
|
154
150
|
| webOS | After calling this API, display **Reboots**! |
|
|
155
|
-
| RaspberryPi | After calling this API, RPi **Reboots backend server which can take up to 60 seconds**!<br /> During the reboot no JS API is available.<br />Always wait for Promise resolution.
|
|
156
|
-
:::
|
|
151
|
+
| RaspberryPi | After calling this API, RPi **Reboots backend server which can take up to 60 seconds**!<br /> During the reboot no JS API is available.<br />Always wait for Promise resolution.
|
|
157
152
|
|
|
158
153
|
## setNTP()
|
|
159
154
|
Method `setNTP()` lets you configure NTP server and timezone.
|
|
160
155
|
|
|
161
|
-
|
|
156
|
+
|
|
162
157
|
| Param |Type | Required | Description |
|
|
163
158
|
| -------------- | ---------- | :----------: | ------------------ |
|
|
164
159
|
| `ntpServer` | string | <div class="red">Yes</div> | Address of the NTP server |
|
|
165
|
-
| `timezone` | string | <div class="red">Yes</div> | Timezone to set. Accepted values are timezone names from [timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
166
|
-
:::
|
|
160
|
+
| `timezone` | string | <div class="red">Yes</div> | Timezone to set. Accepted values are timezone names from [timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
167
161
|
|
|
168
162
|
### Javascript example
|
|
169
163
|
```javascript
|
|
@@ -172,11 +166,10 @@ const timezone = "Europe/Amsterdam";
|
|
|
172
166
|
await sos.management.time.setNTP(ntpServer, timezone);
|
|
173
167
|
```
|
|
174
168
|
|
|
175
|
-
:::
|
|
169
|
+
:::warning
|
|
176
170
|
Setting NTP server and timezone has side effects:
|
|
177
171
|
|
|
178
172
|
| Platform | Side effect |
|
|
179
173
|
| ----------- | -------------------------------------------- |
|
|
180
174
|
| Tizen | After calling this API, display **Reboots**!<br/><br/> Tizen has [**limited set of available timezones**. Read more here.](https://docs.signageos.io/hc/en-us/articles/4405381271314) |
|
|
181
|
-
| RaspberryPi | After calling this API, RPi **Reboots backend server which can take up to 60 seconds**!<br /> During the reboot no JS API is available.<br />Always wait for Promise resolution.
|
|
182
|
-
:::
|
|
175
|
+
| RaspberryPi | After calling this API, RPi **Reboots backend server which can take up to 60 seconds**!<br /> During the reboot no JS API is available.<br />Always wait for Promise resolution.
|