@signageos/front-applet 8.2.1 → 8.2.4

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 (143) hide show
  1. package/dist/bundle.js +20 -6
  2. package/dist/bundle.js.map +1 -1
  3. package/docs/index.md +9 -9
  4. package/docs/sos/browser.md +11 -3
  5. package/docs/sos/display.md +13 -20
  6. package/docs/sos/fileSystem.md +31 -6
  7. package/docs/sos/hardware/barcodeScanner.md +9 -0
  8. package/docs/sos/hardware/index.md +9 -0
  9. package/docs/sos/native/mdc.md +8 -3
  10. package/docs/sos/osd.md +9 -0
  11. package/docs/sos/video.md +9 -0
  12. package/docs/sos_management/app.md +97 -18
  13. package/docs/sos_management/audio.md +43 -2
  14. package/docs/sos_management/autoRecovery.md +101 -0
  15. package/docs/sos_management/debug.md +84 -1
  16. package/docs/sos_management/firmware.md +64 -1
  17. package/docs/sos_management/index.md +217 -19
  18. package/docs/sos_management/network.md +84 -29
  19. package/docs/sos_management/os.md +59 -4
  20. package/docs/sos_management/package.md +25 -3
  21. package/docs/sos_management/power.md +142 -18
  22. package/docs/sos_management/proxy.md +54 -3
  23. package/docs/sos_management/remoteControl.md +55 -4
  24. package/docs/sos_management/screen.md +140 -29
  25. package/docs/sos_management/security.md +48 -5
  26. package/docs/sos_management/time.md +76 -9
  27. package/docs/sos_management/wifi.md +207 -45
  28. package/es6/FrontApplet/Browser/Browser.d.ts +11 -3
  29. package/es6/FrontApplet/Browser/Browser.js +13 -4
  30. package/es6/FrontApplet/Browser/Browser.js.map +1 -1
  31. package/es6/FrontApplet/Command/Command.js +8 -10
  32. package/es6/FrontApplet/Command/Command.js.map +1 -1
  33. package/es6/FrontApplet/Connect/Connect.js +2 -2
  34. package/es6/FrontApplet/Connect/Connect.js.map +1 -1
  35. package/es6/FrontApplet/Debug/debugDecorator.d.ts +1 -1
  36. package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
  37. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +1 -1
  38. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
  39. package/es6/FrontApplet/Display/Display.d.ts +14 -19
  40. package/es6/FrontApplet/Display/Display.js +14 -19
  41. package/es6/FrontApplet/Display/Display.js.map +1 -1
  42. package/es6/FrontApplet/FileSystem/FileSystem.d.ts +27 -5
  43. package/es6/FrontApplet/FileSystem/FileSystem.js +27 -5
  44. package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
  45. package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.d.ts +1 -2
  46. package/es6/FrontApplet/Font/fontFaceGenerator.js +1 -1
  47. package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -1
  48. package/es6/FrontApplet/FrontApplet.js +3 -3
  49. package/es6/FrontApplet/FrontApplet.js.map +1 -1
  50. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +10 -1
  51. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +9 -0
  52. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
  53. package/es6/FrontApplet/Hardware/Hardware.d.ts +9 -0
  54. package/es6/FrontApplet/Hardware/Hardware.js +9 -0
  55. package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
  56. package/es6/FrontApplet/Iframe/Iframe.js +1 -1
  57. package/es6/FrontApplet/Iframe/Iframe.js.map +1 -1
  58. package/es6/FrontApplet/Input/Input.js +2 -1
  59. package/es6/FrontApplet/Input/Input.js.map +1 -1
  60. package/es6/FrontApplet/Management/App/App.d.ts +53 -17
  61. package/es6/FrontApplet/Management/App/App.js +23 -12
  62. package/es6/FrontApplet/Management/App/App.js.map +1 -1
  63. package/es6/FrontApplet/Management/App/IApp.d.ts +3 -0
  64. package/es6/FrontApplet/Management/Audio/Audio.d.ts +24 -3
  65. package/es6/FrontApplet/Management/Audio/Audio.js +24 -3
  66. package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
  67. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +49 -3
  68. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +49 -3
  69. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
  70. package/es6/FrontApplet/Management/Debug/Debug.d.ts +44 -2
  71. package/es6/FrontApplet/Management/Debug/Debug.js +43 -1
  72. package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
  73. package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +41 -4
  74. package/es6/FrontApplet/Management/Firmware/Firmware.js +33 -0
  75. package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
  76. package/es6/FrontApplet/Management/Management.d.ts +119 -21
  77. package/es6/FrontApplet/Management/Management.js +119 -22
  78. package/es6/FrontApplet/Management/Management.js.map +1 -1
  79. package/es6/FrontApplet/Management/Network/Network.d.ts +44 -25
  80. package/es6/FrontApplet/Management/Network/Network.js +28 -14
  81. package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
  82. package/es6/FrontApplet/Management/OS/IOS.d.ts +3 -0
  83. package/es6/FrontApplet/Management/OS/OS.d.ts +32 -4
  84. package/es6/FrontApplet/Management/OS/OS.js +32 -4
  85. package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
  86. package/es6/FrontApplet/Management/Package/Package.d.ts +18 -3
  87. package/es6/FrontApplet/Management/Package/Package.js +18 -4
  88. package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
  89. package/es6/FrontApplet/Management/Power/IPower.d.ts +3 -0
  90. package/es6/FrontApplet/Management/Power/IPower.js.map +1 -1
  91. package/es6/FrontApplet/Management/Power/Power.d.ts +67 -20
  92. package/es6/FrontApplet/Management/Power/Power.js +71 -25
  93. package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
  94. package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +28 -3
  95. package/es6/FrontApplet/Management/Proxy/Proxy.js +28 -3
  96. package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
  97. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +23 -5
  98. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +23 -5
  99. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
  100. package/es6/FrontApplet/Management/Screen/Screen.d.ts +77 -32
  101. package/es6/FrontApplet/Management/Screen/Screen.js +65 -26
  102. package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
  103. package/es6/FrontApplet/Management/Security/Security.d.ts +25 -7
  104. package/es6/FrontApplet/Management/Security/Security.js +25 -7
  105. package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
  106. package/es6/FrontApplet/Management/Time/Time.d.ts +47 -11
  107. package/es6/FrontApplet/Management/Time/Time.js +29 -7
  108. package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
  109. package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +3 -0
  110. package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
  111. package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +137 -42
  112. package/es6/FrontApplet/Management/Wifi/Wifi.js +139 -43
  113. package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
  114. package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +8 -3
  115. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +8 -3
  116. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
  117. package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
  118. package/es6/FrontApplet/OSD/OSD.js +9 -0
  119. package/es6/FrontApplet/OSD/OSD.js.map +1 -1
  120. package/es6/FrontApplet/Offline/Cache/Cache.js +2 -2
  121. package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
  122. package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +1 -1
  123. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
  124. package/es6/FrontApplet/Offline/Offline.js +2 -2
  125. package/es6/FrontApplet/Offline/Offline.js.map +1 -1
  126. package/es6/FrontApplet/Sync/Sync.js +6 -3
  127. package/es6/FrontApplet/Sync/Sync.js.map +1 -1
  128. package/es6/FrontApplet/Touch/Touch.js +2 -1
  129. package/es6/FrontApplet/Touch/Touch.js.map +1 -1
  130. package/es6/FrontApplet/Validate/Validate.d.ts +1 -1
  131. package/es6/FrontApplet/Validate/Validate.js +9 -9
  132. package/es6/FrontApplet/Validate/Validate.js.map +1 -1
  133. package/es6/FrontApplet/Validate/ValidateObjectInterface.js +10 -10
  134. package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -1
  135. package/es6/FrontApplet/Video/Video.d.ts +9 -0
  136. package/es6/FrontApplet/Video/Video.js +11 -1
  137. package/es6/FrontApplet/Video/Video.js.map +1 -1
  138. package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +2 -2
  139. package/es6/Monitoring/Management/Screen/handleScreenRequests.js +2 -1
  140. package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
  141. package/es6/bundle.js +5 -5
  142. package/es6/bundle.js.map +1 -1
  143. package/package.json +16 -21
package/docs/index.md CHANGED
@@ -6,11 +6,11 @@ sidebar_position: 0
6
6
 
7
7
  # Applet JS SDK
8
8
 
9
- Applet JS SDK provides device's native features and functionalities with unified API for all supported platforms. This SDK is only usable
10
- inside of [signageOS applets](https://docs.signageos.io/hc/en-us/articles/4405068855570-Introduction-to-Applets) and allows you to create
9
+ Applet JS SDK provides the device's native features and functionalities with a unified API for all supported platforms. This SDK is only usable
10
+ inside [signageOS applets](https://docs.signageos.io/hc/en-us/articles/4405068855570-Introduction-to-Applets) and allows you to create
11
11
  lightweight applets and deploy them on any device.
12
12
 
13
- ```ts
13
+ ```ts title="Simple example of Applet
14
14
  import sos from '@signageos/front-applet';
15
15
 
16
16
  sos.onReady(async () => {
@@ -19,13 +19,13 @@ sos.onReady(async () => {
19
19
  ```
20
20
 
21
21
  ## Getting started
22
+ This section refers to the JS SDK API reference and provides detailed information for every function, including rich examples.
22
23
 
23
- The Getting started page summarizes key concept of applet development and will guide you through creating your first applet.
24
-
25
- ## Guides
26
-
27
- In Guides section contains articles which describe how to use the SDK with explanation and examples.
24
+ To develop an applet using the Applet JS SDK, you need to install our [CLI](https://developers.signageos.io/docs/cli-setup) and follow our guide [Getting started with Applets](https://developers-staging.signageos.io/docs/applets/getting-started/).
28
25
 
29
26
  ## API Reference
27
+ The JS API reference is divided into two main sections:
28
+ - `sos` - Main object which contains APIs for controlling video playback, streams, or serial ports.
29
+ - `sos.management` - This section contains management APIs for controlling the device's features like audio, network, Wi-Fi, etc.
30
30
 
31
- Our API reference offers a complete list of APIs in the SDK with a description what it does and what is possible with it.
31
+ You can also check our public examples on [GitHub](https://github.com/signageos/applet-examples/)
@@ -4,21 +4,29 @@ sidebar_position: 0
4
4
 
5
5
  # browser
6
6
 
7
- There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet). For these cases, you can use a custom web browser we built. Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
7
+ There are several use cases when you need to open a web browser on a touch-enabled device (also known as a tablet). For these cases, you can use a custom web browser we built. Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
8
8
 
9
9
  :::info
10
10
 
11
11
  **This API is currently available on:**
12
12
  - Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
13
13
 
14
- **With some limitation you can use this API also on**
14
+ **With some limitations, you can also use this API on**
15
15
  - Samsung Tizen (SSSP 4 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
16
16
  - LG webOS (webOS 3.0 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
17
17
  - Linux (Fedora, Ubuntu), Raspberry Pi, NEC Compute Module; where the website is just in fullscreen without an address bar or theme options (headless mode)
18
18
  - BrightSign; where the website is just in fullscreen without an address bar or theme options (headless mode)
19
-
20
19
  :::
21
20
 
21
+ <details>
22
+ <summary>Device Browser Capabilities</summary>
23
+ | Capability | Description |
24
+ |:------------|:-------------|
25
+ | `BROWSER` | If device can open browser with custom URL |
26
+
27
+ If you want to check if the device supports this capability, use [`sos.display.supports()`](https://developers.signageos.io/sdk/sos/display#supports).
28
+ </details>
29
+
22
30
  ## Methods
23
31
 
24
32
  ### close()
@@ -7,30 +7,23 @@ sidebar_position: 0
7
7
  The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
8
8
  features it supports.
9
9
 
10
- <details>
11
- <summary>List of all display capabilities</summary>
12
- | Capability | Description |
13
- |:------------|:-------------|
14
- | `FILE_SYSTEM_INTERNAL_STORAGE` | If device supports internal storage |
15
- | `FILE_SYSTEM_EXTERNAL_STORAGE` | If device supports external storage |
16
- | `FILE_SYSTEM_FILE_CHECKSUM` | If device supports file checksum calculation |
17
- | `FILE_SYSTEM_LINK` | If device supports file system `link()` |
18
- | `FILE_SYSTEM_CREATE_ARCHIVE` | If device supports creating archives in the file system |
19
- | `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | If device can determine a total size of a potentially extracted archive |
20
- | `TIMERS_PROPRIETARY` | If device supports proprietary timers |
21
- | `VIDEO_4K` | If device supports 4K video playback |
22
- | `BROWSER` | If device supports opening browser |
23
- | `SERIAL` | If device supports serial port communication |
24
- | `BARCODE_SCANNER` | If device supports barcode scanner setup |
25
- | `FRONT_OSD` | If device supports Front OSD (our on-screen display) |
26
- | `PROXIMITY_SENSOR` | If device supports proximity sensor |
27
- </details>
28
-
29
10
  ## Methods
30
11
 
31
12
  ### supports()
32
13
 
33
- The `supports()` method determines whether a queried capability is supported by the device.
14
+ The `supports()` method determines whether the device supports a queried capability.
15
+
16
+ #### What are capabilities?
17
+ Capabilities are features or functionalities that a device can support. We divided those capabilities into `front` and `management` capabilities.
18
+ This section is about front capabilities, which include features like handling serial ports, video and stream playback, and more.
19
+
20
+ On the other hand, the `management` capabilities are features that are related to the application management, such as app upgrade, app version, and more.
21
+ To check `management` capabilities, refer to the `sos.management.supports()` method or [this section](https://developers.signageos.io/sdk/sos_management/#supports).
22
+
23
+ :::tip
24
+ If you want to check specific capabilities, refer to the sidebar for the selected management section. Every section has its capabilities written in the description,
25
+ or check the **DisplayCapability** type in `supports()` methods. It has a list of all available capabilities for all platforms.
26
+ :::
34
27
 
35
28
  ```ts expandable
36
29
  supports(capability: DisplayCapability): Promise<boolean>;
@@ -17,6 +17,20 @@ Applet Reload only deletes `/data` directory which is reserved for simplified [O
17
17
  - [Example usage of File System API in Applet](https://github.com/signageos/applet-examples/tree/master/examples/content-js-api/file-system)
18
18
  :::
19
19
 
20
+ <details>
21
+ <summary>Device File System Capabilities</summary>
22
+ | Capability | Description |
23
+ |:------------|:-------------|
24
+ | `FILE_SYSTEM_INTERNAL_STORAGE` | If device supports internal storage units |
25
+ | `FILE_SYSTEM_EXTERNAL_STORAGE` | If device supports connecting external storage units |
26
+ | `FILE_SYSTEM_FILE_CHECKSUM` | If device supports checksum for MD5 or CRC32 hash algorithms |
27
+ | `FILE_SYSTEM_LINK` | If device supports creating hard links to files |
28
+ | `FILE_SYSTEM_CREATE_ARCHIVE` | If device supports creating archives - zip |
29
+ | `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | If device supports extracting information about archive files |
30
+
31
+ If you want to check if the device supports this capability, use [`sos.display.supports()`](https://developers.signageos.io/sdk/sos/display#supports).
32
+ </details>
33
+
20
34
 
21
35
  ## Storing files permanently
22
36
  To allow more low-level file operations, the applet SDK exposes the File System API. Files created using this API are permanent and are only removed on a factory reset or file system wipeout.
@@ -1261,7 +1275,7 @@ files.forEach((file) => {
1261
1275
 
1262
1276
  ### listInternalStorageUnits()
1263
1277
 
1264
- A shorthand method for listing only the internal storage units (i.e. those with the `removable: false`). The capacity values are in bytes.
1278
+ A shorthand method for listing only the internal storage units (i.e., those with the `removable: false`). The capacity values are in bytes.
1265
1279
 
1266
1280
  ```ts expandable
1267
1281
  listInternalStorageUnits(): Promise<IStorageUnit[]>;
@@ -1596,7 +1610,12 @@ removeStorageUnitsChangedListener(listener: () => void): void;
1596
1610
 
1597
1611
  ### wipeout()
1598
1612
 
1599
- The `wipeout()` method is used to wipe out all data from the file system, later when action is finished the device is rebooted.
1613
+ The `wipeout()` method is used to wipe out all data from the file system.
1614
+
1615
+ :::danger
1616
+ - Ensure that function is called only once, otherwise it will wipe out the file system again on applet or device start!
1617
+ - This function is clearing internal file system storage, cache storage and cookies. Local storage will not be cleared.
1618
+ :::
1600
1619
 
1601
1620
  ```ts expandable
1602
1621
  wipeout(): Promise<void>;
@@ -1606,10 +1625,16 @@ wipeout(): Promise<void>;
1606
1625
 
1607
1626
  A promise that resolves when the wipeout is complete.
1608
1627
 
1609
- :::danger
1610
- - Ensure that function is called only once, otherwise it will wipe out the file system again on applet start!
1611
- - This function is clearing internal file system storage, cache storage and cookies. Local storage will not be cleared.
1612
- :::
1628
+ #### Example
1629
+
1630
+ ```ts
1631
+ await sos.fileSystem.wipeout().then(() => {
1632
+ console.log('File system wiped out successfully.');
1633
+ await sos.management.power.systemReboot(); // Reboot the device after wipeout
1634
+ }).catch((error) => {
1635
+ console.error('Error wiping out file system:', error);
1636
+ });
1637
+ ```
1613
1638
 
1614
1639
  <Separator />
1615
1640
 
@@ -11,6 +11,15 @@ It allows starting and stopping the scanner, as well as listening for scanned da
11
11
  This API is experimental and may change in the future.
12
12
  :::
13
13
 
14
+ <details>
15
+ <summary>Device Barcode Scanner Capabilities</summary>
16
+ | Capability | Description |
17
+ |:------------|:-------------|
18
+ | `BARCODE_SCANNER` | If device supports serial communication for Barcode Scanners |
19
+
20
+ If you want to check if the device supports this capability, use [`sos.display.supports()`](https://developers.signageos.io/sdk/sos/display#supports).
21
+ </details>
22
+
14
23
  ## Methods
15
24
 
16
25
  ### getVersion()
@@ -11,6 +11,15 @@ The `sos.hardware` API groups together methods for working with hardware. It all
11
11
  - Samsung Kiosk serial connection only works over serial ports, not over USB ports.
12
12
  :::
13
13
 
14
+ <details>
15
+ <summary>Device Hardware Capabilities</summary>
16
+ | Capability | Description |
17
+ |:------------|:-------------|
18
+ | `SERIAL` | If the device supports sending and receiving data via serial ports |
19
+
20
+ If you want to check if the device supports this capability, use [`sos.display.supports()`](https://developers.signageos.io/sdk/sos/display#supports).
21
+ </details>
22
+
14
23
  ### List of supported serial ports
15
24
  Bellow is example list of serial ports that can be used with `sos.hardware.openSerialPort()` method.
16
25
 
@@ -10,9 +10,14 @@ The `sos.native.mdc` API groups together methods for controlling Tizen devices u
10
10
  This API is currently available on Tizen devices only.
11
11
  :::
12
12
 
13
- :::info
14
- You can ensure that the device supports MDC commands via `sos.management.supports("NATIVE_COMMANDS_MDC")`.
15
- :::
13
+ <details>
14
+ <summary>MDC Management Capabilities</summary>
15
+ | Capability | Description |
16
+ |:------------|:-------------|
17
+ | `NATIVE_COMMANDS_MDC` | If device supports performing MDC commands |
18
+
19
+ If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
20
+ </details>
16
21
 
17
22
  ## Methods
18
23
 
package/docs/sos/osd.md CHANGED
@@ -8,6 +8,15 @@ The `sos.osd` API groups together methods for working with the signageOS OSD (On
8
8
 
9
9
  More information about the OSD can be found in the [OSD Introduction](https://docs.signageos.io/hc/en-us/articles/4405231839890-OSD-menu-by-signageOS)
10
10
 
11
+ <details>
12
+ <summary>Front OSD Capabilities</summary>
13
+ | Capability | Description |
14
+ |:------------|:-------------|
15
+ | `FRONT_OSD` | If device supports opening OSD |
16
+
17
+ If you want to check if the device supports this capability, use [`sos.display.supports()`](https://developers.signageos.io/sdk/sos/display#supports).
18
+ </details>
19
+
11
20
  ## Methods
12
21
 
13
22
  ### showOSD()
package/docs/sos/video.md CHANGED
@@ -16,6 +16,15 @@ The `sos.video` provides you 4 methods to handle the playback:
16
16
  First 5 parameters (uri, x, y, width, and height) are unique identifiers for playing the video using play, stop, resume, and pause methods.
17
17
  :::
18
18
 
19
+ <details>
20
+ <summary>Device Video Capabilities</summary>
21
+ | Capability | Description |
22
+ |:------------|:-------------|
23
+ | `VIDEO_4K` | If device supports playing 4k videos |
24
+
25
+ If you want to check if the device supports this capability, use [`sos.display.supports()`](https://developers.signageos.io/sdk/sos/display#supports).
26
+ </details>
27
+
19
28
  ## Gapless video playback
20
29
  It is often desirable to be able to play different videos consecutively without "black" frames. To achieve this next video in the queue needs to be loaded before the current video ends. How to achieve this may differ from platform to platform. Applet JS SDK handles this under the hood and provides you with `prepare()`, `play()` and `stop()` methods.
21
30
  Each video has to be pre-loaded with `prepare()` while the previous video is still playing, and after the video ends it should be unloaded immediately with `stop()`. This is because some (especially older ones) platforms support that only 2 videos are loaded into memory at any time (one playing and one ready to play).
@@ -6,49 +6,76 @@ sidebar_position: 0
6
6
 
7
7
  The `sos.management.app` API groups together methods for managing the signageOS application installed on the system.
8
8
 
9
+ <details>
10
+ <summary>App Management Capabilities</summary>
11
+ | Capability | Description |
12
+ |:------------|:-------------|
13
+ | `APP_UPGRADE` | If the signageOS application can upgrade itself to a specific version |
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
+
9
18
  ## Methods
10
19
 
11
20
  ### getType()
12
21
 
13
- The `getType()` method returns type of the platform the application is running on.
22
+ The `getType()` method returns the type of the platform the application is running on.
14
23
 
15
24
  :::info
16
-
17
- If you need to get specific Android brand or Raspberry Pi model, use the `sos.management.firmware.getType()`.
18
-
25
+ - If you need to get a specific Android brand or Raspberry Pi model, use the `sos.management.firmware.getType()`.
26
+ - `default` type is always Emulator.
19
27
  :::
20
28
 
21
29
  ```ts expandable
22
30
  getType(): Promise<AppType>;
23
31
  // show-more
32
+ /**
33
+ * All available app types
34
+ */
24
35
  type AppType = 'android' | 'brightsign' | 'default' | 'linux' | 'sssp' | 'tizen' | 'webos' | 'windows' | 'chromeos' | AnyString;
25
36
 
26
37
  type AnyString = string & {};
27
38
 
28
39
  ```
29
40
 
30
- <Separator />
41
+ #### Return value
31
42
 
32
- ### getVersion()
43
+ Resolves to the type of the application platform.
33
44
 
34
- The `getVersion()` method returns version of the application currently running.
45
+ #### Example
35
46
 
36
- :::info
47
+ ```ts
48
+ const appType = await sos.management.app.getType();
49
+ console.log(appType); // tizen, linux, webos, etc.
50
+ ```
37
51
 
38
- This API is only available for Applets deployed via Timing from Box or REST API.
52
+ <Separator />
39
53
 
40
- :::
54
+ ### getVersion()
55
+
56
+ The `getVersion()` method returns the version of the Core App that is currently running on the device.
41
57
 
42
58
  ```ts expandable
43
59
  getVersion(): Promise<string>;
44
60
  ```
45
61
 
62
+ #### Return value
63
+
64
+ Resolves to the version of the Core application.
65
+
66
+ #### Example
67
+
68
+ ```ts
69
+ const version = await sos.management.app.getVersion();
70
+ console.log(`Current application version is: ${version}`); // e.g. '4.0.0', '5.2.1', etc.
71
+ ```
72
+
46
73
  <Separator />
47
74
 
48
75
  ### upgrade(appUri)
49
76
 
50
- The `upgrade(appUri)` method upgrades the signageOS application with provided appUri. Open users can upgrade app passing FQN
51
- uri where the application main file is located.
77
+ The `upgrade(appUri)` method upgrades the signageOS application with the provided `appUri`. Open users can upgrade the app passing FQN
78
+ URI where the application's main file is located.
52
79
 
53
80
  This file type/extension differs for every platform. E.g.:
54
81
  - SSSP: http://example.com/apps/sssp_config.xml or http://example.com/apps/ApplicationName.zip
@@ -58,6 +85,11 @@ This file type/extension differs for every platform. E.g.:
58
85
  - Brightsign: http://example.com/apps/ApplicationName.zip
59
86
  - Linux: http://example.com/apps/ApplicationName.apk
60
87
  - Android: http://example.com/apps/ApplicationName.apk
88
+ - ChromeOS: Not supported
89
+
90
+ :::tip
91
+ Check our latest versions in our [changelogs](https://docs.signageos.io/hc/en-us/sections/4409161443730-Core-Apps).
92
+ :::
61
93
 
62
94
  ```ts expandable
63
95
  upgrade(appUri: string): Promise<void>;
@@ -65,9 +97,36 @@ upgrade(appUri: string): Promise<void>;
65
97
 
66
98
  #### Params
67
99
 
68
- | Name | Type | Required | Description |
69
- |----------|----------|------------------|-----------------------------------------------------|
70
- | `appUri` | `string` | <div>Yes</div> | FQN uri where the application main file is located. |
100
+ | Name | Type | Required | Description |
101
+ |----------|----------|------------------|-------------------------------------------------------|
102
+ | `appUri` | `string` | <div>Yes</div> | FQN uri where the application's main file is located. |
103
+
104
+ #### Return value
105
+
106
+ A promise that resolves when the upgrade starts.
107
+
108
+ #### Possible errors
109
+
110
+ If the upgrade fails.
111
+
112
+ #### Example
113
+
114
+ ```ts
115
+ // Upgrade the application to a specific version
116
+ await sos.management.app.upgrade('http://example.com/apps/ApplicationName.zip')
117
+ .then(() => {
118
+ console.log('Application upgrade started successfully.');
119
+ })
120
+ .catch((error) => {
121
+ console.error('Failed to start application upgrade:', error);
122
+ });
123
+ ```
124
+
125
+ :::note[GitHub Example]
126
+
127
+ - [ How to upgrade application via applets](https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/app-upgrade)
128
+
129
+ :::
71
130
 
72
131
  <Separator />
73
132
 
@@ -90,8 +149,8 @@ upgrade(baseUrl: string, version: string): Promise<void>;
90
149
 
91
150
  ### upgrade(version, baseUrl)
92
151
 
93
- The `upgrade(version, baseUrl?)` method upgrades the signageOS application using version and baseUrl. Platform users can install general
94
- application version directly with passing just version number. Optionally, the baseUrl can be passed as argument to specify server
152
+ The `upgrade(version, baseUrl?)` method upgrades the signageOS application using version and baseUrl. Platform users can install the general
153
+ application version directly with passing just the version number. Optionally, the baseUrl can be passed as an argument to specify the server
95
154
  where the application files are accessible.
96
155
 
97
156
  ```ts expandable
@@ -103,4 +162,24 @@ upgrade(version: string, baseUrl?: string): Promise<void>;
103
162
  | Name | Type | Required | Description |
104
163
  |-----------|----------|------------------|----------------------------------------------------------------------------------------------------------|
105
164
  | `version` | `string` | <div>Yes</div> | The version of the application being installed. |
106
- | `baseUrl` | `string` | <div>No</div> | Optional server URL where application files are located.<br/>(Default value: `"https://2.signageos.io"`) |
165
+ | `baseUrl` | `string` | <div>No</div> | Optional server URL where application files are located.<br/>(Default value: `"https://2.signageos.io"`) |
166
+
167
+ #### Return value
168
+
169
+ A promise that resolves when the upgrade starts.
170
+
171
+ #### Possible errors
172
+
173
+ If the upgrade fails.
174
+
175
+ #### Example
176
+
177
+ ```ts
178
+ await sos.management.app.upgrade('4.0.0', 'https://2.signageos.io')
179
+ ```
180
+
181
+ :::note[GitHub Example]
182
+
183
+ - [ How to upgrade application via applets](https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/app-upgrade)
184
+
185
+ :::
@@ -6,21 +6,42 @@ sidebar_position: 0
6
6
 
7
7
  The `sos.management.audio` API groups methods for managing audio settings.
8
8
 
9
+ <details>
10
+ <summary>Volume Management Capabilities</summary>
11
+ | Capability | Description |
12
+ |:------------|:-------------|
13
+ | `SET_VOLUME` | If device can set volume level |
14
+ | `GET_VOLUME` | If device can get current volume level |
15
+
16
+ If you want to check if the device supports those capabilities, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
17
+ </details>
18
+
9
19
  ## Methods
10
20
 
11
21
  ### getVolume()
12
22
 
13
- The `getVolume()` method returns current volume level of the device.
23
+ The `getVolume()` method returns the current volume level of the device.
14
24
 
15
25
  ```ts expandable
16
26
  getVolume(): Promise<number>;
17
27
  ```
18
28
 
29
+ #### Return value
30
+
31
+ A promise that resolves to the current volume level, which is a value between 0 and 100.
32
+
33
+ #### Example
34
+
35
+ ```ts
36
+ const currentVolume = await sos.management.audio.getVolume();
37
+ console.log(`Current volume level is: ${currentVolume}`); // e.g. 75
38
+ ```
39
+
19
40
  <Separator />
20
41
 
21
42
  ### setVolume()
22
43
 
23
- The `getVolume()` method set the volume level of the device.
44
+ The `setVolume()` method sets the volume level of the device.
24
45
 
25
46
  ```ts expandable
26
47
  setVolume(volume: number): Promise<void>;
@@ -32,6 +53,26 @@ setVolume(volume: number): Promise<void>;
32
53
  |----------|----------|------------------|--------------------------|
33
54
  | `volume` | `number` | <div>Yes</div> | Value between 0 and 100. |
34
55
 
56
+ #### Return value
57
+
58
+ A promise that resolves when the volume is set.
59
+
60
+ #### Possible errors
61
+
62
+ If the volume is not a number or is outside the range of 0 to 100.
63
+
64
+ #### Example
65
+
66
+ ```ts
67
+ await sos.management.audio.setVolume(50);
68
+ ```
69
+
70
+ :::note[GitHub Example]
71
+
72
+ - [ Example applet with setting volume](https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/volume)
73
+
74
+ :::
75
+
35
76
  ## API Example
36
77
 
37
78
  ```ts
@@ -0,0 +1,101 @@
1
+ ---
2
+ sidebar_position: 0
3
+ ---
4
+
5
+ # autoRecovery
6
+
7
+ The `sos.management.autoRecovery` API provides methods for managing the auto-recovery feature of the signageOS app.
8
+
9
+ The Auto Recovery feature is designed to automatically recover the signageOS app in case of a crash or unexpected shutdown
10
+ or switching input to a different value, e.g., HDMI.
11
+
12
+ <details>
13
+ <summary>Auto Recovery Management Capabilities</summary>
14
+ | Capability | Description |
15
+ |:------------|:-------------|
16
+ | `AUTO_RECOVERY` | If the device can enable or disable the auto recovery function. |
17
+
18
+ If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
19
+ </details>
20
+
21
+ ## Methods
22
+
23
+ ### get()
24
+
25
+ The `get()` method retrieves the current auto-recovery configuration.
26
+
27
+ ```ts expandable
28
+ get(): Promise<IAutoRecoveryConfiguration>;
29
+ // show-more
30
+ type IAutoRecoveryConfiguration = {
31
+ enabled: false;
32
+ autoEnableTimeoutMs?: number;
33
+ } | {
34
+ enabled: true;
35
+ healthcheckIntervalMs: number;
36
+ };
37
+
38
+ ```
39
+
40
+ #### Return value
41
+
42
+ A promise that resolves to the current auto-recovery configuration.
43
+
44
+ #### Example
45
+
46
+ ```ts
47
+ const autoRecoveryConfig = await sos.management.autoRecovery.get();
48
+ if (autoRecoveryConfig.enabled) {
49
+ console.log(`Auto-recovery is enabled with a healthcheck interval of ${autoRecoveryConfig.healthcheckIntervalMs} ms.`);
50
+ }
51
+ ```
52
+
53
+ <Separator />
54
+
55
+ ### set()
56
+
57
+ The `set()` method allows to enable or disable the auto-recovery feature and configure its settings.
58
+
59
+ :::note
60
+ The configuration object has different properties depending on if enabled is true or false.
61
+ :::
62
+
63
+ ```ts expandable
64
+ set(configuration: IAutoRecoveryConfiguration): Promise<void>;
65
+ // show-more
66
+ type IAutoRecoveryConfiguration = {
67
+ enabled: false;
68
+ autoEnableTimeoutMs?: number;
69
+ } | {
70
+ enabled: true;
71
+ healthcheckIntervalMs: number;
72
+ };
73
+
74
+ ```
75
+
76
+ #### Params
77
+
78
+ | Name | Type | Required | Description |
79
+ |---------------------------------------|------------------------------|------------------|-------------------------------------------------------------------------------------------------------------|
80
+ | `configuration` | `IAutoRecoveryConfiguration` | <div>Yes</div> | The configuration object for auto-recovery settings. |
81
+ | `configuration.enabled` | `true` | <div>Yes</div> | A boolean to set auto-recovery to enabled or disabled state. |
82
+ | `configuration.autoEnableTimeoutMs` | `number` | <div>No</div> | The timeout in milliseconds after which the auto-recovery will be automatically enabled if it was disabled. |
83
+ | `configuration.healthcheckIntervalMs` | `number` | <div>Yes</div> | The interval in milliseconds for the health check if application is running in foreground. |
84
+
85
+ #### Return value
86
+
87
+ A promise that resolves when the auto-recovery settings are successfully set.
88
+
89
+ #### Possible errors
90
+
91
+ If the configuration is invalid.
92
+
93
+ #### Example
94
+
95
+ ```ts
96
+ // Enable auto-recovery with a healthcheck interval of 5000 ms
97
+ await sos.management.autoRecovery.set({
98
+ enabled: true,
99
+ healthcheckIntervalMs: 5000,
100
+ });
101
+ ```