@signageos/front-applet 6.2.0 → 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.
Files changed (43) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/docs/{js-api/js-applet-basics.md → applet-basics.md} +37 -98
  3. package/docs/index.md +97 -0
  4. package/docs/js-api/js-applet-resources.md +10 -28
  5. package/docs/js-api/js-browser.md +15 -30
  6. package/docs/js-api/js-command.md +33 -91
  7. package/docs/js-api/{js-api-debug.md → js-debug.md} +2 -3
  8. package/docs/js-api/js-device-info.md +4 -5
  9. package/docs/js-api/js-display.md +5 -7
  10. package/docs/js-api/js-file-system.md +13 -14
  11. package/docs/js-api/{js-loading-fonts.md → js-fonts.md} +21 -44
  12. package/docs/js-api/js-hardware.md +6 -9
  13. package/docs/js-api/js-iframes.md +3 -3
  14. package/docs/js-api/js-input.md +2 -3
  15. package/docs/js-api/js-offline-cache-media-files.md +26 -83
  16. package/docs/js-api/js-offline-cache-simple-data.md +11 -16
  17. package/docs/js-api/js-osd.md +0 -2
  18. package/docs/js-api/js-proof-of-play.md +4 -6
  19. package/docs/js-api/js-sensors.md +1 -1
  20. package/docs/js-api/{js-hardware-serial.md → js-serial.md} +12 -17
  21. package/docs/js-api/js-sync-playback.md +30 -70
  22. package/docs/js-api/js-video-inputs-internal-ports.md +15 -33
  23. package/docs/js-api/js-video-stream.md +49 -85
  24. package/docs/js-api/js-video.md +25 -75
  25. package/docs/management-api/{10-js-management-application.md → js-management-application.md} +16 -32
  26. package/docs/management-api/{7-js-management-volume.md → js-management-audio.md} +4 -6
  27. package/docs/management-api/{9-js-management-debug.md → js-management-debug.md} +5 -18
  28. package/docs/management-api/{2-js-management-firmware.md → js-management-firmware.md} +11 -25
  29. package/docs/management-api/{1-js-management.md → js-management-management.md} +8 -37
  30. package/docs/{js-api/js-monitoring-commands.md → management-api/js-management-monitoring-commands.md} +5 -6
  31. package/docs/{js-api/js-monitors.md → management-api/js-management-monitors.md} +9 -9
  32. package/docs/management-api/{11-js-management-network.md → js-management-network.md} +14 -40
  33. package/docs/management-api/{2-js-management-os.md → js-management-os.md} +2 -3
  34. package/docs/management-api/{8-js-management-package.md → js-management-package.md} +4 -6
  35. package/docs/management-api/{4-js-management-power.md → js-management-power.md} +10 -15
  36. package/docs/management-api/{14-js-management-proxy.md → js-management-proxy.md} +4 -6
  37. package/docs/management-api/{3-js-management-remote-control.md → js-management-remote-control.md} +5 -20
  38. package/docs/management-api/{5-js-management-screen.md → js-management-screen.md} +27 -81
  39. package/docs/management-api/{12-js-management-security.md → js-management-security.md} +6 -9
  40. package/docs/management-api/{6-js-management-time.md → js-management-time.md} +19 -26
  41. package/docs/management-api/{13-js-management-wifi.md → js-management-wifi.md} +31 -40
  42. package/package.json +1 -1
  43. package/docs/js-api/js-api-introduction.md +0 -91
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.2.1] - 2024-01-15
8
+ ### Fixed
9
+ - Docs markdowns
10
+
7
11
  ## [6.2.0] - 2024-01-15
8
12
  ### Added
9
13
  - Add `keepAppletRunning` parameter in `sos.management.power.setProprietaryTimer`
@@ -17,7 +17,7 @@ This thread contains basic methods of every Applet used to load necessary config
17
17
 
18
18
  ## All methods and properties
19
19
 
20
- ::: table-responsive
20
+
21
21
  | Methods/Property | Description | Supported since |
22
22
  | ----------------- | ----------- | :---------------: |
23
23
  | `onReady()` | This method will wait until sOS object library and all dependencies are ready to be used. | 1.0.0 |
@@ -26,8 +26,7 @@ This thread contains basic methods of every Applet used to load necessary config
26
26
  | `appletVersion` | Returns current Applet version | JS API `4.5.0`, Front-display `7.8.0`|
27
27
  | `config` object | Returns object with key-values set via Timing or as a bundled config| JS API `1.5.0`, Front-display `6.8.0`|
28
28
  | `config` object | Returns object with key-values set via Timing or as a bundled config| `1.0.0`|
29
- | `capabilities` | Enum of device-specific capabilities and features | `1.0.0`|
30
- :::
29
+ | `capabilities` | Enum of device-specific capabilities and features | `1.0.0`
31
30
 
32
31
  ## Starting Applet
33
32
 
@@ -77,7 +76,7 @@ console.log(sos.config);
77
76
  ## onReady()
78
77
  This method will wait until sOS object library and all dependencies are ready to be used.
79
78
 
80
- ::: alert alert--danger
79
+ :::danger
81
80
  Every Applet must contain this method, otherwise it won't work.
82
81
  :::
83
82
 
@@ -102,21 +101,9 @@ window.addEventListener('sos.loaded',() => {
102
101
  });
103
102
  ```
104
103
 
105
- <div class="row d-flex align-content-stretch force-padding-20">
106
- <div class="col-12 d-flex">
107
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/restore">
108
- <div>
109
- <div class="wide-box__image d-flex align-items-center">
110
- <i class="fab fa-github svg-black"></i>
111
- </div>
112
- <div>
113
- <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet for basic start</h3>
114
- <div class="wide-box__description">Working example on our Github</div>
115
- </div>
116
- </div>
117
- </a>
118
- </div>
119
- </div>
104
+ :::note[GitHub Example]
105
+ [Example of Applet for basic start](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/restore)
106
+ :::
120
107
 
121
108
  ## restore()
122
109
  The typical case of usage for digital signage is playing a loop with some specified duration. This method should be called always when the loop is changed. It will clear all previously played videos, streams, clear display views, and notify for garbage collection.
@@ -145,21 +132,9 @@ window.addEventListener('sos.loaded', () => {
145
132
  });
146
133
  ```
147
134
 
148
- <div class="row d-flex align-content-stretch force-padding-20">
149
- <div class="col-12 d-flex">
150
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/restore">
151
- <div>
152
- <div class="wide-box__image d-flex align-items-center">
153
- <i class="fab fa-github svg-black"></i>
154
- </div>
155
- <div>
156
- <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet with restore() method</h3>
157
- <div class="wide-box__description">Working example on our Github</div>
158
- </div>
159
- </div>
160
- </a>
161
- </div>
162
- </div>
135
+ :::note[GitHub Example]
136
+ [Example of Applet with restore() method](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/restore)
137
+ :::
163
138
 
164
139
  ## refresh()
165
140
  AFter calling this method applet is freshly launched.
@@ -199,22 +174,12 @@ You can pass CUSTOM key-value variables to the Applet. To do that, add your valu
199
174
  console.log(sos.config.mySecretID);
200
175
  console.log(sos.config.imgUrl);
201
176
  ```
202
- <div class="row d-flex align-content-stretch force-padding-20">
203
- <div class="col-12 d-flex">
204
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank"
205
- href="https://docs.signageos.io/hc/en-us/articles/4405238989458">
206
- <div>
207
- <div class="wide-box__image d-flex align-items-center">
208
- <i class="fas fa-hand-point-right svg-black"></i>
209
- </div>
210
- <div>
211
- <h3 class="wide-box__title wide-box__title__small pl-85">Custom variables in Applet</h3>
212
- <div class="wide-box__description">How to pass custom variables and cofiguration to your Applet</div>
213
- </div>
214
- </div>
215
- </a>
216
- </div>
217
- </div>
177
+
178
+ :::note[Guide]
179
+ [Custom variables in Applet](https://docs.signageos.io/hc/en-us/articles/4405238989458)
180
+
181
+ How to pass custom variables and cofiguration to your Applet
182
+ :::
218
183
 
219
184
  ## Applet JS API version
220
185
 
@@ -232,14 +197,13 @@ There are two kinds of capabilities - display and management.
232
197
 
233
198
  Display capabilities refer to the capabilities of the display in terms of content, playback, peripherals, etc.
234
199
 
235
- ::: table-responsive
200
+
236
201
  | Capability | Description |
237
202
  | ------------------------------ | ----------------------------------------------------------------------------------------- |
238
- | `FILE_SYSTEM_EXTERNAL_STORAGE` | Device file system supports [external storage](/api/js/content/js-file-system) (i.e. flash drives) |
239
- | `FILE_SYSTEM_FILE_CHECKSUM` | Device is can [calculate a file checksum](/api/js/content/js-file-system#getfilechecksum) |
240
- | `VIDEO_4K` | Device is capable of [playing 4K video](/api/js/content/js-video) |
241
- | `SERIAL` | Device supports communication with peripherals over [serial](/api/js/content/js-hardware-serial) |
242
- :::
203
+ | `FILE_SYSTEM_EXTERNAL_STORAGE` | Device file system supports [external storage](content/js-file-system) (i.e. flash drives) |
204
+ | `FILE_SYSTEM_FILE_CHECKSUM` | Device is can [calculate a file checksum](content/js-file-system#getfilechecksum) |
205
+ | `VIDEO_4K` | Device is capable of [playing 4K video](content/js-video) |
206
+ | `SERIAL` | Device supports communication with peripherals over [serial](content/js-serial)
243
207
 
244
208
  #### Javascript example:
245
209
 
@@ -249,41 +213,28 @@ if (await sos.display.supports('VIDEO_4K')) {
249
213
  }
250
214
  ```
251
215
 
252
- <div class="row d-flex align-content-stretch force-padding-20">
253
- <div class="col-12 d-flex">
254
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/capabilities-content">
255
- <div>
256
- <div class="wide-box__image d-flex align-items-center">
257
- <i class="fab fa-github svg-black"></i>
258
- </div>
259
- <div>
260
- <h3 class="wide-box__title wide-box__title__small pl-85">Example of Content Capabilities</h3>
261
- <div class="wide-box__description">Working example on our Github</div>
262
- </div>
263
- </div>
264
- </a>
265
- </div>
266
- </div>
216
+ :::note[GitHub Example]
217
+ [Example of Content Capabilities](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/capabilities-content)
218
+ :::
267
219
 
268
220
 
269
221
  ### Management capabilities
270
222
 
271
223
  Management capabilities refer to the capabilities of the display's internal state management.
272
224
 
273
- ::: table-responsive
225
+
274
226
  | Capability | Description |
275
227
  | ------------------------------ | ----------------------------------------------------------------------------------------- |
276
- | `BATTERY_STATUS` | Device can [report its battery status](/api/js/management/1-js-management#getbatterystatus). |
277
- | `WIFI` | Device can [connect to a Wi-Fi](/api/js/management/13-js-management-wifi#connect). |
278
- | `WIFI_SCAN` | Device can [scan surrounding Wi-Fi devices](/api/js/management/13-js-management-wifi#scandevices). |
279
- | `WIFI_AP` | Device is capable of [becoming a Wi-Fi endpoint](/api/js/management/13-js-management-wifi#enableap) that other devices can connect to. |
280
- | `SET_BRIGHTNESS` | Device can change its [screen brightness](/api/js/management/5-js-management-screen#setbrightness). |
281
- | `SET_TIME` | Device can change its [time settings](/api/js/management/6-js-management-time). |
282
- | `NTP_TIME` | Device can [synchronize its time with an NTP server](/api/js/management/6-js-management-time#setntp). |
283
- | `PACKAGE_INSTALL` | It's possible to [install additional packages](/api/js/management/8-js-management-package) on the device, managed by signageOS application. |
284
- | `SET_VOLUME` | Device can change its [audio volume](/api/js/management/7-js-management-volume). |
285
- | `SET_REMOTE_CONTROL_ENABLED` | Device can [disable control via IR remote](/api/js/management/3-js-management-remote-control) to increase security. |
286
- :::
228
+ | `BATTERY_STATUS` | Device can [report its battery status](management/js-management#getbatterystatus). |
229
+ | `WIFI` | Device can [connect to a Wi-Fi](management/js-management-wifi#connect). |
230
+ | `WIFI_SCAN` | Device can [scan surrounding Wi-Fi devices](management/js-management-wifi#scandevices). |
231
+ | `WIFI_AP` | Device is capable of [becoming a Wi-Fi endpoint](management/js-management-wifi#enableap) that other devices can connect to. |
232
+ | `SET_BRIGHTNESS` | Device can change its [screen brightness](management/js-management-screen#setbrightness). |
233
+ | `SET_TIME` | Device can change its [time settings](management/js-management-time). |
234
+ | `NTP_TIME` | Device can [synchronize its time with an NTP server](management/js-management-time#setntp). |
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). |
237
+ | `SET_REMOTE_CONTROL_ENABLED` | Device can [disable control via IR remote](management/js-management-remote-control) to increase security.
287
238
 
288
239
  ```javascript
289
240
  if (await sos.management.supports('WIFI')) {
@@ -291,18 +242,6 @@ if (await sos.management.supports('WIFI')) {
291
242
  }
292
243
  ```
293
244
 
294
- <div class="row d-flex align-content-stretch force-padding-20">
295
- <div class="col-12 d-flex">
296
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/capabilities-management">
297
- <div>
298
- <div class="wide-box__image d-flex align-items-center">
299
- <i class="fab fa-github svg-black"></i>
300
- </div>
301
- <div>
302
- <h3 class="wide-box__title wide-box__title__small pl-85">Example of Management Capabilities</h3>
303
- <div class="wide-box__description">Working example on our Github</div>
304
- </div>
305
- </div>
306
- </a>
307
- </div>
308
- </div>
245
+ :::note[GitHub Example]
246
+ [Example of Management Capabilities](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/capabilities-management)
247
+ :::
package/docs/index.md ADDED
@@ -0,0 +1,97 @@
1
+ ---
2
+ title: JS SDK Home
3
+ author: Josef Kral
4
+ date: 4.2.2018
5
+ type: rest-api
6
+ tags:
7
+ - rest_api
8
+ - js_api
9
+ - api
10
+ description: "[Content JS API] General introduction to signageOS JS API"
11
+ ---
12
+ # Javascript SDK for Applet development
13
+
14
+ Javascript SDK gives you access to device's native features and functionalities. You can use the same functions across all devices with the same result.
15
+
16
+ :::tip
17
+ All APIs are standardized and available across all [supported devices](https://docs.signageos.io/hc/en-us/sections/4405700629266-Supported-Devices).
18
+ :::
19
+
20
+ :::info[Start here]
21
+ [Basic information about Applets](/sdk/applet-basics)
22
+
23
+ General information required to use the signageOS JS API
24
+ :::
25
+
26
+ ## Content-related JS APIs
27
+
28
+ Content-related APIs help you with content part of your application /Applet/.
29
+
30
+ Universal APIs for File system, access to accelerated video playback, sensor management and more provide you with robust tool set for creating extensive experiences.
31
+
32
+ | Domain | Description |
33
+ | ------ | ----------- |
34
+ | [Applet Resources](content/js-applet-resources) | Pre-load necessary files required by your HTML5 player/Applet |
35
+ | [Browser](content/js-browser) | Opening managed web-browser on Android devices inc. whitelisting, blacklisting and other features |
36
+ | [Command](content/js-command) | Sending business or technical logs through signageOS in secured offline-ready way |
37
+ | [Debug](content/js-debug) | Start debug session |
38
+ | [Device Info](content/js-device-info) | Device-related informations |
39
+ | [Display](content/js-display) | Query features supported by the display |
40
+ | [File system](content/js-file-system) | Full-featured file system API including ZIP and folder management |
41
+ | [Fonts](content/js-loading-fonts) | Make it easy to load additional fonts into SoC devices |
42
+ | [Hardware](content/js-hardware) | Hardware-specific APIs like LED lights on Philips 10BDL |
43
+ | [Inputs](content/js-input) | Controller inputs like IR remote unified under one API |
44
+ | [iFrames](content/js-iframes) | Using JS SDK in iFrames |
45
+ | [Proof of Play](content/js-proof-of-play) | Proof of Play API |
46
+ | [Sensors](content/js-sensors) | Using sensors and IoT devices in your application |
47
+ | [Serial Port](content/js-hardware-serial) | Control external devices via serial |
48
+ | [Synchronized playback](content/js-sync-playback) | API for creating synced playback and videowalls |
49
+ | [Video Inputs aka PiP](content/js-video-inputs-internal-ports) | Show HDMI/DP/VGA as a part of your content via PiP feature |
50
+ | [Video Playback](content/js-video) | Playing accelerated gapless videos via native video player |
51
+ | [Video Streams](content/js-video-stream) | Playing video streams (RTSP, HLS, UDP) via native video player
52
+
53
+ ## Device control JS APIs
54
+
55
+ Device control features exposed via Javascript APIs.
56
+
57
+ :::tip
58
+ For **Device Management** we strongly recommend using REST APIs. [See the REST API documentation here](https://api.docs.signageos.io).
59
+ :::
60
+
61
+
62
+ | Domain | Description |
63
+ | ------ | ----------- |
64
+ | [Application](management/js-management-application) | Get application version and upgrade application from remote location |
65
+ | [Audio](management/js-management-audio) | Control system volume level |
66
+ | [Debug](management/js-management-debug) | Enable/disable debug mode |
67
+ | [Firmware](management/js-management-firmware) | Get FW version and upgrade FW from remote location |
68
+ | [Management](management/js-management-management) | Information about the device and power action like Reboot, Restart,.. |
69
+ | [Monitors](management/js-management-monitors) | Information about monitors |
70
+ | [Network](management/js-management-network) | Manage network settings |
71
+ | [OS](management/js-management-os) | Get system information like CPU and Memory usage |
72
+ | [Package](management/js-management-package) | Install and manage packages |
73
+ | [Power](management/js-management-power) | Manage display power - timers, restart and reboot |
74
+ | [Proxy](management/js-management-proxy) | Manage display network proxy setup |
75
+ | [IR Remote Control](management/js-management-remote-control) | Manage IR Remote control functionality |
76
+ | [Screen](management/js-management-screen) | Manage brightness, orientation and resolution, display on/off |
77
+ | [Security](management/js-management-security) | Control system security (PIN code) |
78
+ | [Time](management/js-management-time) | Set time, timezone and get current settings |
79
+ | [Wi-Fi](management/js-management-wifi) | Manage Wi-Fi
80
+
81
+ # Testing Framework SDK
82
+
83
+ Write and then run **automated tests** for your applet on physical devices, streamlining your development and QA efforts.
84
+
85
+ See full [documentation on GitHub](https://github.com/signageos/test-framework)
86
+
87
+ # Node.JS SDK
88
+
89
+ Library which allows you to fully manage signageOS applets, devices, management & monitoring using Node.JS and REST API.
90
+
91
+ See full [documentation on GitHub](https://github.com/signageos/sdk)
92
+
93
+ # REST API
94
+
95
+ Large collection of REST API endpoints for device management and monitoring.
96
+
97
+ See full [documentation on Postman](https://api.docs.signageos.io)
@@ -16,20 +16,16 @@ description: "[Content JS API] Often there are some JavaScripts and CSS styles n
16
16
  Often there are some JavaScripts and CSS styles necessary to be loaded for your Applet.
17
17
  It can be libraries like jQuery or even your whole application code. For these necessities offline API for saving, storing & loading files are ready.
18
18
 
19
-
20
- ## All methods
21
- ::: table-responsive
22
19
  | Methods | Description | Supported since |
23
- | ------- | ----------- | ------ | :---------------: |
20
+ | ------- | ----------- | ------ |
24
21
  | `addFile()` | Add single file to Applet before starting it. | 1.0.0 |
25
22
  | `addFiles()` | Add files to Applet before starting it. | 1.0.0 |
26
- | `addFilesSync()` | Add files to Applet before starting it in the set order to prevent race condition. | 1.0.0 |
27
- :::
23
+ | `addFilesSync()` | Add files to Applet before starting it in the set order to prevent race condition. | 1.0.0
28
24
 
29
25
  ### File object
30
26
  Every method above, accept single object or array of objects depending by type. Every object **must have** these keys.
31
27
 
32
- ::: table-responsive
28
+
33
29
  | Key | Type | Required | Description |
34
30
  | :-----: | :-----: | :----: | ------- |
35
31
  | `uri` | String | <div class="red">Yes</div> | URL of file |
@@ -37,10 +33,9 @@ Every method above, accept single object or array of objects depending by type.
37
33
  | `type` | String | <div class="red">Yes</div> | Type of file. Example: `sos.offline.types.javascript`, `sos.offline.types.css`, `sos.offline.types.video` |
38
34
  |||| ^^ |
39
35
  | `flags` | Array | <div class="red">Yes</div> | Special flag for file |
40
- | `headers` | Array | <div class="yellow">No</div> | Authorization headers |
41
- :::
36
+ | `headers` | Array | <div class="yellow">No</div> | Authorization headers
42
37
 
43
- ::: alert alert--info
38
+ :::info
44
39
  * The file URL must point to a file. If your URI leads to a 303 redirect (e.g. from http to http**s**), the API will not work.
45
40
  * There are some limitations for [Emulator](https://docs.signageos.io/hc/en-us/articles/4405238997138).
46
41
  :::
@@ -84,21 +79,9 @@ const files = [ // Array of files
84
79
  await sos.offline.addFiles(files);
85
80
  ```
86
81
 
87
- <div class="row d-flex align-content-stretch force-padding-20">
88
- <div class="col-12 d-flex">
89
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/offline-resources">
90
- <div>
91
- <div class="wide-box__image d-flex align-items-center">
92
- <i class="fab fa-github svg-black"></i>
93
- </div>
94
- <div>
95
- <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet that save files and load them in one file</h3>
96
- <div class="wide-box__description">Working example on our Github</div>
97
- </div>
98
- </div>
99
- </a>
100
- </div>
101
- </div>
82
+ :::note[GitHub Example]
83
+ [Example of Applet that save files and load them in one file](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/offline-resources)
84
+ :::
102
85
 
103
86
  ## addFilesSync()
104
87
  Method `addFilesSync()` works same as method above, but all files are loaded in correct order. Otherwise, files are loaded in random order by file size.
@@ -156,7 +139,7 @@ interface IFlag {
156
139
  ## Errors
157
140
  Although we are doing our best, following errors may occur when working with the Applet Resources.
158
141
 
159
- ::: table-responsive
142
+
160
143
  | Code | Type | Message |
161
144
  | ---- | ---- | ------- |
162
145
  | 40101 | AppletResourcesError | File needs to be object |
@@ -168,5 +151,4 @@ Although we are doing our best, following errors may occur when working with the
168
151
  | 40106 | AppletResourcesError | Already existing file: `FILE_NAME` |
169
152
  |^^|^^| File is already loaded or exists in Applet |
170
153
  | 49901 | FileNotFoundError | File `FILE_ID` was not found |
171
- |^^|^^| Applet can not get file. URL is invalid. |
172
- :::
154
+ |^^|^^| Applet can not get file. URL is invalid.
@@ -18,16 +18,15 @@ For these cases, you can use a custom web browser we built.
18
18
  Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
19
19
 
20
20
  ## All methods
21
- ::: table-responsive
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 |
26
- :::
25
+ | `close()` | Open page in integrated browser | 4.4.0
27
26
 
28
27
  ## open()
29
28
 
30
- ::: alert alert--info
29
+ :::info
31
30
  **This API is currently available on:**
32
31
  - Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
33
32
 
@@ -42,11 +41,11 @@ Simple opening some page ex. our main company page.
42
41
  ```javascript
43
42
  sos.browser.open('https://www.signageos.io'); // Open link in the browser
44
43
  ```
45
- <br>
44
+ <br/>
46
45
 
47
46
  Method `open()` also supports properties for browser. You can set height, width or CORS domains. All properties are optional.
48
47
 
49
- ::: table-responsive
48
+
50
49
  | Property | Type | Description |
51
50
  | -------- | ------ | -------- |
52
51
  | `aclDomains` | Array | ? |
@@ -56,9 +55,8 @@ Method `open()` also supports properties for browser. You can set height, width
56
55
  | `idleTimeout` | Number | Timeout in milliseconds for loading page |
57
56
  | `theme` | Object | Setting custom theme for Android |
58
57
  | `headlessMode` | Boolean | Headless mode hides the entire address bar (default) |
59
- | `canUserClose` | Boolean | Whether the user can manually close the browser. Default:<br>**Headless:** `false`<br>**With UI:** `true` |
60
- | `clearData` | Boolean | Clear cache after the browser closes. Default:<br>**Headless:** `false`<br>**With UI:** `true` |
61
- :::
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`
62
60
 
63
61
 
64
62
  ```javascript
@@ -76,26 +74,14 @@ sos.browser.open('https://www.signageos.io', {
76
74
  headlessMode: false, // supported only on Android
77
75
  ```
78
76
 
79
- <div class="row d-flex align-content-stretch force-padding-20">
80
- <div class="col-12 d-flex">
81
- <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/browser">
82
- <div>
83
- <div class="wide-box__image d-flex align-items-center">
84
- <i class="fab fa-github svg-black"></i>
85
- </div>
86
- <div>
87
- <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet for using browser on Android</h3>
88
- <div class="wide-box__description">Working example on our Github</div>
89
- </div>
90
- </div>
91
- </a>
92
- </div>
93
- </div>
77
+ :::note[GitHub Example]
78
+ [Example of Applet for using browser on Android](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/browser)
79
+ :::
94
80
 
95
81
  ### Browser themes usage with Typescript
96
82
  You can also use all these methods with [signageOS TypeScript](https://docs.signageos.io/hc/en-us/articles/4405069154962#signageos-typescript).
97
83
 
98
- ::: alert alert--info
84
+ :::info
99
85
  Browser themes are only available on Android devices.
100
86
  :::
101
87
 
@@ -162,15 +148,14 @@ Simple opening some page ex. our main company page.
162
148
  ```javascript
163
149
  sos.browser.close(); // Close the browser
164
150
  ```
165
- <br>
151
+ <br/>
166
152
 
167
153
  ## Errors
168
154
  Although we are doing our best, following errors may occur when opening a link.
169
155
 
170
- ::: table-responsive
156
+
171
157
  | Code | Type | Message |
172
158
  | ---- | ---- | ------- |
173
159
  | 40301 | AppletBrowserUriError | Property argument `uri` must be a string |
174
- | 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$` |
175
- :::
160
+ | 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$`
176
161