@signageos/front-applet 6.2.1 → 6.4.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +3 -1
  3. package/dist/bundle.js +2 -2
  4. package/dist/bundle.js.map +1 -1
  5. package/docs/applet-basics.md +3 -3
  6. package/docs/{js-api → content}/js-browser.md +13 -10
  7. package/docs/{js-api → content}/js-display.md +15 -5
  8. package/docs/{js-api → content}/js-file-system.md +4 -16
  9. package/docs/{js-api → content}/js-offline-cache-simple-data.md +1 -1
  10. package/docs/{js-api → content}/js-sensors.md +2 -2
  11. package/docs/{js-api → content}/js-serial.md +1 -1
  12. package/docs/{js-api → content}/js-video-inputs-internal-ports.md +1 -1
  13. package/docs/content/js-video-stream.md +560 -0
  14. package/docs/index.md +3 -3
  15. package/docs/{management-api → management}/js-management-management.md +60 -20
  16. package/docs/{management-api → management}/js-management-network.md +3 -3
  17. package/docs/{management-api → management}/js-management-wifi.md +8 -8
  18. package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +4 -0
  19. package/es6/FrontApplet/Browser/IOpenLinkOptions.js +1 -0
  20. package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
  21. package/es6/FrontApplet/Input/IInput.d.ts +11 -0
  22. package/es6/FrontApplet/Input/IInput.js +3 -0
  23. package/es6/FrontApplet/Input/IInput.js.map +1 -0
  24. package/es6/FrontApplet/Input/Input.d.ts +5 -1
  25. package/es6/FrontApplet/Input/Input.js +6 -0
  26. package/es6/FrontApplet/Input/Input.js.map +1 -1
  27. package/es6/FrontApplet/Stream/Stream.d.ts +7 -3
  28. package/es6/FrontApplet/Stream/Stream.js +234 -63
  29. package/es6/FrontApplet/Stream/Stream.js.map +1 -1
  30. package/es6/FrontApplet/Stream/streamEvents.d.ts +1 -1
  31. package/package.json +8 -5
  32. package/docs/js-api/js-video-stream.md +0 -491
  33. /package/docs/{js-api → content}/js-applet-resources.md +0 -0
  34. /package/docs/{js-api → content}/js-command.md +0 -0
  35. /package/docs/{js-api → content}/js-debug.md +0 -0
  36. /package/docs/{js-api → content}/js-device-info.md +0 -0
  37. /package/docs/{js-api → content}/js-fonts.md +0 -0
  38. /package/docs/{js-api → content}/js-hardware.md +0 -0
  39. /package/docs/{js-api → content}/js-iframes.md +0 -0
  40. /package/docs/{js-api → content}/js-input.md +0 -0
  41. /package/docs/{js-api → content}/js-offline-cache-media-files.md +0 -0
  42. /package/docs/{js-api → content}/js-osd.md +0 -0
  43. /package/docs/{js-api → content}/js-proof-of-play.md +0 -0
  44. /package/docs/{js-api → content}/js-sync-playback.md +0 -0
  45. /package/docs/{js-api → content}/js-video.md +0 -0
  46. /package/docs/{management-api → management}/js-management-application.md +0 -0
  47. /package/docs/{management-api → management}/js-management-audio.md +0 -0
  48. /package/docs/{management-api → management}/js-management-debug.md +0 -0
  49. /package/docs/{management-api → management}/js-management-firmware.md +0 -0
  50. /package/docs/{management-api → management}/js-management-monitoring-commands.md +0 -0
  51. /package/docs/{management-api → management}/js-management-monitors.md +0 -0
  52. /package/docs/{management-api → management}/js-management-os.md +0 -0
  53. /package/docs/{management-api → management}/js-management-package.md +0 -0
  54. /package/docs/{management-api → management}/js-management-power.md +0 -0
  55. /package/docs/{management-api → management}/js-management-proxy.md +0 -0
  56. /package/docs/{management-api → management}/js-management-remote-control.md +0 -0
  57. /package/docs/{management-api → management}/js-management-screen.md +0 -0
  58. /package/docs/{management-api → management}/js-management-security.md +0 -0
  59. /package/docs/{management-api → management}/js-management-time.md +0 -0
@@ -167,7 +167,7 @@ window.addEventListener('sos.loaded',() => {
167
167
 
168
168
  ## Custom variables in Applet
169
169
 
170
- You can pass CUSTOM key-value variables to the Applet. To do that, add your values as a Timing configuration (over Box of [Timings API](/api/rest/timing/3-timing-post-one)). Then you can access your values via `sos.config` object.
170
+ You can pass CUSTOM key-value variables to the Applet. To do that, add your values as a Timing configuration (over Box of [Timings API](https://docs.signageos.io/hc/en-us/articles/4405238989458)). Then you can access your values via `sos.config` object.
171
171
 
172
172
  ```javascript
173
173
  // Parsed JSON object passed to Timing for current applet & current device together
@@ -225,7 +225,7 @@ Management capabilities refer to the capabilities of the display's internal stat
225
225
 
226
226
  | Capability | Description |
227
227
  | ------------------------------ | ----------------------------------------------------------------------------------------- |
228
- | `BATTERY_STATUS` | Device can [report its battery status](management/js-management#getbatterystatus). |
228
+ | `BATTERY_STATUS` | Device can [report its battery status](management/js-management-management#getbatterystatus). |
229
229
  | `WIFI` | Device can [connect to a Wi-Fi](management/js-management-wifi#connect). |
230
230
  | `WIFI_SCAN` | Device can [scan surrounding Wi-Fi devices](management/js-management-wifi#scandevices). |
231
231
  | `WIFI_AP` | Device is capable of [becoming a Wi-Fi endpoint](management/js-management-wifi#enableap) that other devices can connect to. |
@@ -233,7 +233,7 @@ Management capabilities refer to the capabilities of the display's internal stat
233
233
  | `SET_TIME` | Device can change its [time settings](management/js-management-time). |
234
234
  | `NTP_TIME` | Device can [synchronize its time with an NTP server](management/js-management-time#setntp). |
235
235
  | `PACKAGE_INSTALL` | It's possible to [install additional packages](management/js-management-package) on the device, managed by signageOS application. |
236
- | `SET_VOLUME` | Device can change its [audio volume](management/js-management-volume). |
236
+ | `SET_VOLUME` | Device can change its [audio volume](management/js-management-audio). |
237
237
  | `SET_REMOTE_CONTROL_ENABLED` | Device can [disable control via IR remote](management/js-management-remote-control) to increase security.
238
238
 
239
239
  ```javascript
@@ -13,24 +13,24 @@ description: "[Content JS API] There are several use-cases when you need to open
13
13
 
14
14
  # Browser
15
15
 
16
- There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet).
17
- For these cases, you can use a custom web browser we built.
18
- Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
16
+ There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet).
17
+ For these cases, you can use a custom web browser we built.
18
+ Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
19
19
 
20
20
  ## All methods
21
21
 
22
22
  | Methods | Description | Supported since |
23
23
  | ----------------- | ----------- | :---------------: |
24
24
  | `open()` | Open page in integrated browser | 4.0.0 |
25
- | `close()` | Open page in integrated browser | 4.4.0
25
+ | `close()` | Open page in integrated browser | 4.4.0
26
26
 
27
27
  ## open()
28
28
 
29
29
  :::info
30
- **This API is currently available on:**
30
+ **This API is currently available on:**
31
31
  - Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
32
32
 
33
- **With some limitation you can use this API also on**
33
+ **With some limitation you can use this API also on**
34
34
  - Samsung Tizen (SSSP 4 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
35
35
  - LG webOS (webOS 3.0 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
36
36
  - Raspberry Pi and NEC Compute Module; where the website is just in fullscreen without an address bar or theme options (headless mode)
@@ -51,12 +51,14 @@ Method `open()` also supports properties for browser. You can set height, width
51
51
  | `aclDomains` | Array | ? |
52
52
  | `aclMode` | String | Can be only **blacklist** or **whitelist**. |
53
53
  | `readOnlyAddressBar` | Boolean | Accessible address bar |
54
- | `coordinates` | Object | Size of browser screen (only Raspberry Pi) |
54
+ | `coordinates` | Object | Size of browser screen (only Linux) |
55
55
  | `idleTimeout` | Number | Timeout in milliseconds for loading page |
56
56
  | `theme` | Object | Setting custom theme for Android |
57
57
  | `headlessMode` | Boolean | Headless mode hides the entire address bar (default) |
58
58
  | `canUserClose` | Boolean | Whether the user can manually close the browser. Default:<br/>**Headless:** `false`<br/>**With UI:** `true` |
59
- | `clearData` | Boolean | Clear cache after the browser closes. Default:<br/>**Headless:** `false`<br/>**With UI:** `true`
59
+ | `clearData` | Boolean | Clear cache after the browser closes. Default:<br/>**Headless:** `false`<br/>**With UI:** `true`
60
+ | `method` | String | Can only be **native** (which opens a new, fully sandboxed fullscreen window) or **iframe** (which opens a configurable-sized window). (only Linux) |
61
+ :::
60
62
 
61
63
 
62
64
  ```javascript
@@ -64,7 +66,7 @@ sos.browser.open('https://www.signageos.io', {
64
66
  aclDomains: ['google.com', 'yahoo.com'],
65
67
  aclMode: 'blacklist', // or 'whitelist'
66
68
  readOnlyAddressBar: true,
67
- coordinates: { // Supported only on Raspberry Pi and Android
69
+ coordinates: { // Supported only on Linux and Android
68
70
  x: 0,
69
71
  y: 0,
70
72
  height: 500,
@@ -134,6 +136,7 @@ interface IOpenLinkOptions {
134
136
  headlessMode?: boolean;
135
137
  clearData?: boolean;
136
138
  canUserClose?: boolean;
139
+ method?: 'native' | 'iframe'
137
140
  }
138
141
 
139
142
  open(uri: string, options?: IOpenLinkOptions): void;
@@ -157,5 +160,5 @@ Although we are doing our best, following errors may occur when opening a link.
157
160
  | Code | Type | Message |
158
161
  | ---- | ---- | ------- |
159
162
  | 40301 | AppletBrowserUriError | Property argument `uri` must be a string |
160
- | 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$`
163
+ | 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$`
161
164
 
@@ -32,13 +32,23 @@ with a warning message like this one:
32
32
 
33
33
  :::warning
34
34
  * Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
35
- * More info [**HERE**](/api/js/content/latest/js-display#supports).
36
35
  :::
37
36
 
38
-
39
- | Param | Type | Required | Description |
40
- | ------------ | ------ | :------------------------: | --------------- |
41
- | `capability` | string | <div class="red">Yes</div> | Capability name
37
+ ### List of capabilities
38
+
39
+ | Param | Description |
40
+ | ------------ | --------------- |
41
+ | `FILE_SYSTEM_INTERNAL_STORAGE` | |
42
+ | `FILE_SYSTEM_EXTERNAL_STORAGE` | |
43
+ | `FILE_SYSTEM_FILE_CHECKSUM` | |
44
+ | `FILE_SYSTEM_LINK` | |
45
+ | `TIMERS_PROPRIETARY` | |
46
+ | `VIDEO_4K` | |
47
+ | `SERIAL` | |
48
+ | `BARCODE_SCANNER` | |
49
+ | `FRONT_OSD` | |
50
+ | `FILE_SYSTEM_CREATE_ARCHIVE` | |
51
+ | `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | Information about total size of all files when archive will be extracted |
42
52
 
43
53
  ### Javascript example
44
54
  ```javascript
@@ -16,7 +16,7 @@ File System API allows **low level manipulation with files and directories** in
16
16
  File System API works with both in **internal and external storages** (USB flash drives, etc.).
17
17
 
18
18
  :::warning
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](/api/js/content/js-offline-cache-media-files). Use `deleteFile()` to clear the device storage file system.
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
22
  <div class="row d-flex align-content-stretch force-padding-10">
@@ -35,21 +35,9 @@ File System directory structure is **PERSISTENT** and is **NOT** automatically d
35
35
  </div>
36
36
  </div>
37
37
 
38
- <div class="row d-flex align-content-stretch force-padding-20">
39
- <div class="col-12 d-flex">
40
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" href="/api/js/content/js-offline-cache-media-files">
41
- <div>
42
- <div class="wide-box__image d-flex align-items-center">
43
- <i class="fas fa-medal svg-black"></i>
44
- </div>
45
- <div>
46
- <h3 class="wide-box__title wide-box__title__small pl-85">Offline Cache for media files</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[Alternative file caching]
39
+ [Offline Cache for media files](js-offline-cache-media-files)
40
+ :::
53
41
 
54
42
  ## All methods
55
43
 
@@ -15,7 +15,7 @@ description: "[Content JS API] This API provides you with approach similar to th
15
15
 
16
16
  Use when you need to save some data into local memory.
17
17
  This API provides you with approach similar to the HTML5's Local Storage, but implemented internally via native device API and completely device agnostic.
18
- We do not recommend using a different storage type then Offline Cache or full featured [File System API](/api/js/content/js-file-system) that will provide you with more low-level methods.
18
+ We do not recommend using a different storage type then Offline Cache or full featured [File System API](js-file-system) that will provide you with more low-level methods.
19
19
 
20
20
  ## All methods
21
21
 
@@ -62,9 +62,9 @@ For more information read [this article](https://docs.signageos.io/hc/en-us/arti
62
62
 
63
63
  Sometimes you might want to use hardware that we don't support out of the box yet.
64
64
 
65
- Firstly, you will need to read the documentation for the [serial API](/api/js/content/js-hardware-serial).
65
+ Firstly, you will need to read the documentation for the [serial API](js-serial).
66
66
  Most often, the hardware you will decide to use connects to the device via USB and internally uses a serial communication, like RS232.
67
67
  In that case you will use the serial API.
68
68
 
69
- You can approach this any way you like, but remember that you should always implement the [interfaces defined by us](/api/js/content/js-sensors#sensors-interfaces).
69
+ You can approach this any way you like, but remember that you should always implement the [interfaces defined by us](js-sensors#sensors-interfaces).
70
70
  That will allow for greater code reusability and readability.
@@ -21,7 +21,7 @@ Such hardware could be, for example, printers, payment terminals or sensors.
21
21
 
22
22
  :::warning
23
23
  * Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
24
- * More info [**HERE**](/api/js/content/latest/js-display#supports).
24
+ * More info [**HERE**](js-display#supports).
25
25
  * Samsung Kiosk serial connection only works over serial ports, not over USB ports
26
26
  :::
27
27
 
@@ -22,7 +22,7 @@ Display content from another device over HDMI, Display Port, or other port. PIP
22
22
  | `stop()` | Method stops using the internal port. | 1.0.18 |
23
23
 
24
24
  ## play()
25
- Method uses the same API as [video streams](/api/js/content/js-video-stream). Instead of URL (for stream), **specify an URI of the port** to display.
25
+ Method uses the same API as [video streams](js-video-stream). Instead of URL (for stream), **specify an URI of the port** to display.
26
26
 
27
27
  ### Parameters
28
28