@signageos/front-applet 6.4.1 → 6.4.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/CHANGELOG.md +4 -0
- package/docs/content/js-file-system.md +5 -17
- package/docs/content/js-hardware.md +3 -15
- package/docs/content/js-iframes.md +6 -30
- package/docs/content/js-input.md +3 -15
- package/docs/management/js-management-package.md +3 -15
- package/docs/management/js-management-power.md +6 -30
- package/docs/management/js-management-security.md +3 -15
- package/docs/management/js-management-time.md +3 -17
- package/docs/management/js-management-wifi.md +4 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [6.4.2] - 2024-01-26
|
|
8
|
+
### Fixed
|
|
9
|
+
- Documentation on several pages is now readable again due to fixes in MD files
|
|
10
|
+
|
|
7
11
|
## [6.4.1] - 2024-01-24
|
|
8
12
|
### Fixed
|
|
9
13
|
- Stream public documentation formatting
|
|
@@ -19,21 +19,9 @@ File System API works with both in **internal and external storages** (USB flash
|
|
|
19
19
|
File System directory structure is **PERSISTENT** and is **NOT** automatically deleted through `Applet Reload` power action! Applet Reload only deletes `/data` directory which is reserved for simplified [Offline Cache API](js-offline-cache-media-files). Use `deleteFile()` to clear the device storage file system.
|
|
20
20
|
:::
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<div>
|
|
26
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
27
|
-
<i class="fab fa-github svg-black"></i>
|
|
28
|
-
</div>
|
|
29
|
-
<div>
|
|
30
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Complete example of the File System API on our Github</h3>
|
|
31
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</a>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
22
|
+
:::note[GitHub Examples]
|
|
23
|
+
[Complete example of the File System API on our Github](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/file-system)
|
|
24
|
+
:::
|
|
37
25
|
|
|
38
26
|
:::note[Alternative file caching]
|
|
39
27
|
[Offline Cache for media files](js-offline-cache-media-files)
|
|
@@ -245,7 +233,7 @@ Return statement is a dynamic object! It has to be always generated and retrieve
|
|
|
245
233
|
|
|
246
234
|
### Parameters
|
|
247
235
|
|
|
248
|
-
| Param | Type | Required | Description |
|
|
236
|
+
| Param | Type | Required | Description |
|
|
249
237
|
| -------------- | ----- | :------: | ------ |
|
|
250
238
|
| `filePath` | FilePath | <div class="red">Yes</div> | Object contains storageUnit object returned by `listStorageUnits()` and `filePath` if the file or directory |
|
|
251
239
|
|
|
@@ -274,7 +262,7 @@ Download file to path within existing directory or **overrides existing file** i
|
|
|
274
262
|
|
|
275
263
|
### Parameters
|
|
276
264
|
|
|
277
|
-
|
|
|
265
|
+
| Param | Type | Required | Description |
|
|
278
266
|
| -------------- | ----- | :----: | ---- |
|
|
279
267
|
| `filePath` | FilePath | <div class="red">Yes</div> | Object contains storageUnit object returned by `listStorageUnits()` and `filePath` if the file or directory |
|
|
280
268
|
| `uri` | String | <div class="red">Yes</div> | Url address to retrieve the file from network |
|
|
@@ -40,21 +40,9 @@ Some Philips brand devices have LED lights built into them. The color of lights
|
|
|
40
40
|
sos.hardware.led.setColor("#00FF00"); // For GREEN light
|
|
41
41
|
```
|
|
42
42
|
|
|
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">Example of Applet with LED usage</h3>
|
|
52
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</a>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
43
|
+
:::note[GitHub Example]
|
|
44
|
+
[Example of Applet with LED usage](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/hardware-led)
|
|
45
|
+
:::
|
|
58
46
|
|
|
59
47
|
## Errors
|
|
60
48
|
Although we are doing our best, following errors may occur when working with the hardware.
|
|
@@ -36,21 +36,9 @@ First applet, what will be as iframe in main applet. There is also **required ev
|
|
|
36
36
|
</script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<div>
|
|
43
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
44
|
-
<i class="fab fa-github svg-black"></i>
|
|
45
|
-
</div>
|
|
46
|
-
<div>
|
|
47
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Applet that will be in Iframe</h3>
|
|
48
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</a>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
39
|
+
:::note[GitHub Example]
|
|
40
|
+
[Applet that will be in Iframe](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/iframes)
|
|
41
|
+
:::
|
|
54
42
|
|
|
55
43
|
## Finally, use created applet in another applet as iframe.
|
|
56
44
|
|
|
@@ -73,18 +61,6 @@ window.addEventListener('sos.loaded', () => {
|
|
|
73
61
|
});
|
|
74
62
|
```
|
|
75
63
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<div>
|
|
80
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
81
|
-
<i class="fab fa-github svg-black"></i>
|
|
82
|
-
</div>
|
|
83
|
-
<div>
|
|
84
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">How to use Iframes in Applet</h3>
|
|
85
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
</a>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
64
|
+
:::note[GitHub Example]
|
|
65
|
+
[How to use Iframes in Applet](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/iframes)
|
|
66
|
+
:::
|
package/docs/content/js-input.md
CHANGED
|
@@ -66,18 +66,6 @@ interface IKeyUpEventListener {
|
|
|
66
66
|
onKeyUp(listener: IKeyUpEventListener): void;
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<div>
|
|
73
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
74
|
-
<i class="fab fa-github svg-black"></i>
|
|
75
|
-
</div>
|
|
76
|
-
<div>
|
|
77
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">IR Input handling</h3>
|
|
78
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</a>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
69
|
+
:::note[GitHub Example]
|
|
70
|
+
[IR Input handling](https://github.com/signageos/applet-examples/tree/master/examples/content-js-api/remote-control)
|
|
71
|
+
:::
|
|
@@ -43,18 +43,6 @@ await sos.management.package.install(
|
|
|
43
43
|
);
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div>
|
|
50
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
51
|
-
<i class="fab fa-github svg-black"></i>
|
|
52
|
-
</div>
|
|
53
|
-
<div>
|
|
54
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">How to install package on device</h3>
|
|
55
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</a>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
46
|
+
:::note[GitHub Example]
|
|
47
|
+
[How to install package on device](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/package-install/)
|
|
48
|
+
:::
|
|
@@ -35,21 +35,9 @@ Method `systemReboot()` will reboot a targeted device.
|
|
|
35
35
|
await sos.management.power.systemReboot(); // Returns void
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<div>
|
|
42
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
43
|
-
<i class="fab fa-github svg-black"></i>
|
|
44
|
-
</div>
|
|
45
|
-
<div>
|
|
46
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Management System Reboot</h3>
|
|
47
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</a>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
38
|
+
:::note[GitHub Example]
|
|
39
|
+
[Management System Reboot](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/system-reboot/)
|
|
40
|
+
:::
|
|
53
41
|
|
|
54
42
|
## appRestart()
|
|
55
43
|
Method `appRestart()` will restart the application on a targeted device.
|
|
@@ -182,18 +170,6 @@ const timers = await sos.management.power.getProprietaryTimers();
|
|
|
182
170
|
]
|
|
183
171
|
```
|
|
184
172
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
<div>
|
|
189
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
190
|
-
<i class="fab fa-github svg-black"></i>
|
|
191
|
-
</div>
|
|
192
|
-
<div>
|
|
193
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">How to use timer in Applet</h3>
|
|
194
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
</a>
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
173
|
+
:::note[GitHub Example]
|
|
174
|
+
[How to use timer in Applet](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/timer/)
|
|
175
|
+
:::
|
|
@@ -45,21 +45,9 @@ PIN code `0000` is not allowed according to the default PIN after boot when the
|
|
|
45
45
|
await sos.management.security.setPinCode("9999");
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<div>
|
|
52
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
53
|
-
<i class="fab fa-github svg-black"></i>
|
|
54
|
-
</div>
|
|
55
|
-
<div>
|
|
56
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Management Security PIN code</h3>
|
|
57
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</a>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
48
|
+
:::note[GitHub Example]
|
|
49
|
+
[Management Security PIN code](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/security-pin-code/)
|
|
50
|
+
:::
|
|
63
51
|
|
|
64
52
|
|
|
65
53
|
## generateRandomPinCode()
|
|
@@ -32,23 +32,9 @@ Method `get()` lets you check for current time with time zone.
|
|
|
32
32
|
const time = await sos.management.time.get();
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<div>
|
|
39
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
40
|
-
<i class="fab fa-github svg-black"></i>
|
|
41
|
-
</div>
|
|
42
|
-
<div>
|
|
43
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">How to manage time on device</h3>
|
|
44
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</a>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<br/>
|
|
35
|
+
:::note[GitHub Example]
|
|
36
|
+
[How to manage time on device](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/time)
|
|
37
|
+
:::
|
|
52
38
|
|
|
53
39
|
### Example of response
|
|
54
40
|
|
|
@@ -85,21 +85,10 @@ See [`getCountry()`](js-management-wifi#getcountry) and [`setCountry()`](js-mana
|
|
|
85
85
|
| `disabled` | Wi-Fi was set to DISABLED state
|
|
86
86
|
|
|
87
87
|
## Examples
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
93
|
-
<i class="fab fa-github svg-black"></i>
|
|
94
|
-
</div>
|
|
95
|
-
<div>
|
|
96
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Applet with Wi-Fi Access Point</h3>
|
|
97
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</a>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
88
|
+
|
|
89
|
+
:::note[GitHub Example]
|
|
90
|
+
[Applet with Wi-Fi Access Point](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/wifi-access-point/)
|
|
91
|
+
:::
|
|
103
92
|
|
|
104
93
|
## isClientEnabled()
|
|
105
94
|
Returns true, if Wi-Fi is in CLIENT state. Otherwise, returns false.
|