@signageos/front-applet 6.2.0 → 6.3.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 (55) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +3 -1
  3. package/dist/bundle.js +1 -1
  4. package/dist/bundle.js.map +1 -1
  5. package/docs/{js-api/js-applet-basics.md → applet-basics.md} +38 -99
  6. package/docs/{js-api → content}/js-applet-resources.md +10 -28
  7. package/docs/{js-api → content}/js-browser.md +24 -36
  8. package/docs/{js-api → content}/js-command.md +33 -91
  9. package/docs/{js-api/js-api-debug.md → content/js-debug.md} +2 -3
  10. package/docs/{js-api → content}/js-device-info.md +4 -5
  11. package/docs/{js-api → content}/js-display.md +18 -10
  12. package/docs/{js-api → content}/js-file-system.md +17 -30
  13. package/docs/{js-api/js-loading-fonts.md → content/js-fonts.md} +21 -44
  14. package/docs/{js-api → content}/js-hardware.md +6 -9
  15. package/docs/{js-api → content}/js-iframes.md +3 -3
  16. package/docs/{js-api → content}/js-input.md +2 -3
  17. package/docs/{js-api → content}/js-offline-cache-media-files.md +26 -83
  18. package/docs/{js-api → content}/js-offline-cache-simple-data.md +12 -17
  19. package/docs/{js-api → content}/js-osd.md +0 -2
  20. package/docs/{js-api → content}/js-proof-of-play.md +4 -6
  21. package/docs/{js-api → content}/js-sensors.md +3 -3
  22. package/docs/{js-api/js-hardware-serial.md → content/js-serial.md} +13 -18
  23. package/docs/{js-api → content}/js-sync-playback.md +30 -70
  24. package/docs/{js-api → content}/js-video-inputs-internal-ports.md +16 -34
  25. package/docs/{js-api → content}/js-video-stream.md +49 -85
  26. package/docs/{js-api → content}/js-video.md +25 -75
  27. package/docs/index.md +97 -0
  28. package/docs/{management-api/10-js-management-application.md → management/js-management-application.md} +16 -32
  29. package/docs/{management-api/7-js-management-volume.md → management/js-management-audio.md} +4 -6
  30. package/docs/{management-api/9-js-management-debug.md → management/js-management-debug.md} +5 -18
  31. package/docs/{management-api/2-js-management-firmware.md → management/js-management-firmware.md} +11 -25
  32. package/docs/{management-api/1-js-management.md → management/js-management-management.md} +67 -56
  33. package/docs/{js-api/js-monitoring-commands.md → management/js-management-monitoring-commands.md} +5 -6
  34. package/docs/{js-api/js-monitors.md → management/js-management-monitors.md} +9 -9
  35. package/docs/{management-api/11-js-management-network.md → management/js-management-network.md} +17 -43
  36. package/docs/{management-api/2-js-management-os.md → management/js-management-os.md} +2 -3
  37. package/docs/{management-api/8-js-management-package.md → management/js-management-package.md} +4 -6
  38. package/docs/{management-api/4-js-management-power.md → management/js-management-power.md} +10 -15
  39. package/docs/{management-api/14-js-management-proxy.md → management/js-management-proxy.md} +4 -6
  40. package/docs/{management-api/3-js-management-remote-control.md → management/js-management-remote-control.md} +5 -20
  41. package/docs/{management-api/5-js-management-screen.md → management/js-management-screen.md} +27 -81
  42. package/docs/{management-api/12-js-management-security.md → management/js-management-security.md} +6 -9
  43. package/docs/{management-api/6-js-management-time.md → management/js-management-time.md} +19 -26
  44. package/docs/{management-api/13-js-management-wifi.md → management/js-management-wifi.md} +38 -47
  45. package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +4 -0
  46. package/es6/FrontApplet/Browser/IOpenLinkOptions.js +1 -0
  47. package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
  48. package/es6/FrontApplet/Input/IInput.d.ts +11 -0
  49. package/es6/FrontApplet/Input/IInput.js +3 -0
  50. package/es6/FrontApplet/Input/IInput.js.map +1 -0
  51. package/es6/FrontApplet/Input/Input.d.ts +5 -1
  52. package/es6/FrontApplet/Input/Input.js +6 -0
  53. package/es6/FrontApplet/Input/Input.js.map +1 -1
  54. package/package.json +7 -4
  55. package/docs/js-api/js-api-introduction.md +0 -91
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Video streams
2
+ title: Video Streams
3
3
  author: Miroslav Behina
4
4
  date: 22.11.2018
5
5
  type: js-api
@@ -15,29 +15,28 @@ description: "[Content JS API] Methods to play or stop video streams."
15
15
  Methods to play or stop video streams.
16
16
 
17
17
  ## All methods
18
- ::: table-responsive
19
- | Methods | Description | Supported since |
20
- | ------------------ | ---------------------------------------------------------------- | --------------- |
21
- | `prepare()` | Prepare video stream in the background | 4.7.0 |
22
- | `play()` | Start playing video stream | 1.0.18 |
23
- | `stop()` | Stop video stream | 1.0.18 |
24
- | `getTracks()` | Get all tracks of the stream | 6.1.0 |
25
- | `selectTrack()` | Select track of the stream | 6.1.0 |
26
- | `resetTrack()` | Reset track of the stream | 6.1.0 |
27
- | `onConnected()` | Calls a listener callback when stream connects | 1.0.20 |
28
- | `onDisconnected()` | Calls a listener callback when stream disconnects | 1.0.20 |
29
- | `onError()` | Calls a listener callback when an unexpected stream error occurs | 1.0.20 |
30
- | `onPlay()` | Calls a listener callback when stream starts playing | 5.12.0 |
31
- | `onStop()` | Calls a listener callback when stream stops | 5.12.0 |
32
- | `onPrepare()` | Calls a listener callback when stream prepares | 5.12.0 |
33
- | `onTracksChanged()`| Calls a listener callback when stream tracks change | 6.1.0 |
34
- :::
35
18
 
36
- ::: alert alert--warning
19
+ | Methods | Description | Supported since |
20
+ | ------------------ | ----------------------------------------------------- | --------------- |
21
+ | `prepare()` | Prepare video stream in the background | 4.7.0 |
22
+ | `play()` | Start playing video stream | 1.0.18 |
23
+ | `stop()` | Stop video stream | 1.0.18 |
24
+ | `getTracks()` | Get all tracks of the stream | 6.1.0 |
25
+ | `selectTrack()` | Select track of the stream | 6.1.0 |
26
+ | `resetTrack()` | Reset track of the stream | 6.1.0 |
27
+ | `onConnected()` | Calls a listener callback when stream connects | 1.0.20 |
28
+ | `onDisconnected()` | Calls a listener callback when stream disconnects | 1.0.20 |
29
+ | `onError()` | Calls a listener callback when an unexpected stream error occurs | 1.0.20 |
30
+ | `onPlay()` | Calls a listener callback when stream starts playing | 5.12.0 |
31
+ | `onStop()` | Calls a listener callback when stream stops | 5.12.0 |
32
+ | `onPrepare()` | Calls a listener callback when stream prepares | 5.12.0 |
33
+ | `onTracksChanged()`| Calls a listener callback when stream tracks change | 6.1.0 |
34
+
35
+ :::warning
37
36
  Are you using **Samsung Tizen** to play streams? [Read more about limitation and Tizen-specific details](https://docs.signageos.io/hc/en-us/articles/4405387373458).
38
37
  :::
39
38
 
40
- ::: alert alert--danger
39
+ :::danger
41
40
  Be aware version of JS API (v6.0.0+) changed how stream functions `play()` and `prepare()` work. For using an options object
42
41
  you need to our latest core app versions. If you are using older core app versions, you need to use deprecated format.
43
42
  :::
@@ -45,12 +44,12 @@ you need to our latest core app versions. If you are using older core app versio
45
44
  ## prepare()
46
45
  Calls the internal player and prepares a video stream in memory, so it can later start playing instantaneously.
47
46
 
48
- ::: alert alert--info
47
+ :::info
49
48
  If you want to play a video stream in full screen mode, use x = y = 0 and width = document.documentElement.clientWidth and height = document.documentElement.clientHeight as setup parameters.
50
49
  :::
51
50
 
52
51
  ### Parameters
53
- ::: table-responsive
52
+
54
53
  | Param | Type | Required | Description |
55
54
  | -------------- | --------------------------- | :--------------------------: | --------------------------------------------- |
56
55
  | `uri` | String | <div class="red">Yes</div> | Network address where the stream is available |
@@ -58,22 +57,20 @@ If you want to play a video stream in full screen mode, use x = y = 0 and width
58
57
  | `y` | Number | <div class="red">Yes</div> | Stream y-position on the screen |
59
58
  | `width` | Number | <div class="red">Yes</div> | Stream width on the screen |
60
59
  | `height` | Number | <div class="red">Yes</div> | Stream height on the screen |
61
- | `options` | Object | <div class="red">Yes</div> | Additional options for the stream |
62
- :::
60
+ | `options` | Object | <div class="red">Yes</div> | Additional options for the stream
63
61
 
64
62
  ### Options object
65
- ::: table-responsive
63
+
66
64
  | Key | Type | Required | Description |
67
65
  | ------------ | --------------------------- | :--------------------------: | --------------------------------------------- |
68
66
  | `protocol` | String | <div class="red">Yes</div> | Protocol that the stream is using |
69
67
  |^^|^^|^^| Types: `HLS`, `RTP`, `HTTP`, `UDP`, `RTMP`, `RTSP`. |
70
68
  | `background` | Boolean | <div class="yellow">No</div> | Prepare stream in the background |
71
69
  | `trackSelection`| Object | <div class="yellow">No</div> | Track selection options |
72
- | `drm` | Object | <div class="yellow">No</div> | DRM options |
73
- :::
70
+ | `drm` | Object | <div class="yellow">No</div> | DRM options
74
71
 
75
72
  ### Track selection object
76
- ::: table-responsive
73
+
77
74
  | Key | Type | Required | Description |
78
75
  | ------------ | --------------------------- | :--------------------------: | --------------------------------------------- |
79
76
  | `maxAudioChannelCount` | Number | <div class="yellow">No</div> | Maximum number of audio channels to play |
@@ -82,18 +79,16 @@ If you want to play a video stream in full screen mode, use x = y = 0 and width
82
79
  | `maxVideoSize` | Object | <div class="yellow">No</div> | Maximum video size to play |
83
80
  |^^|^^|^^| Object with `width` and `height` properties |
84
81
  | `preferredAudioLanguages` | Array of strings | <div class="yellow">No</div> | Preferred audio languages to play |
85
- | `preferredTextLanguages` | Array of strings | <div class="yellow">No</div> | Preferred text languages to play |
86
- :::
82
+ | `preferredTextLanguages` | Array of strings | <div class="yellow">No</div> | Preferred text languages to play
87
83
 
88
84
  ### DRM object
89
- ::: table-responsive
85
+
90
86
  | Key | Type | Required | Description |
91
87
  | ------------ | --------------------------- | :--------------------------: | --------------------------------------------- |
92
88
  | `scheme` | String | <div class="red">Yes</div> | DRM scheme |
93
89
  |^^|^^|^^| Types: `CommonPSSH`, `ClearKey`, `Widevine`, `PlayReady` or own value |
94
90
  | `licenseUri` | String | <div class="red">Yes</div> | DRM license URI |
95
- | `licenseRequestHeaders` | Object | <div class="yellow">No</div> | DRM license request headers |
96
- :::
91
+ | `licenseRequestHeaders` | Object | <div class="yellow">No</div> | DRM license request headers
97
92
 
98
93
 
99
94
  ### Javascript syntax
@@ -108,31 +103,19 @@ await sos.stream.prepare(uri, x, y, width, height, { protocol: 'HTTP', backg
108
103
  await sos.stream.prepare(uri, x, y, width, height, 'HTTP');
109
104
  ```
110
105
 
111
- <div class="row d-flex align-content-stretch force-padding-20">
112
- <div class="col-12 d-flex">
113
- <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/stream">
114
- <div>
115
- <div class="wide-box__image d-flex align-items-center">
116
- <i class="fab fa-github svg-black"></i>
117
- </div>
118
- <div>
119
- <h3 class="wide-box__title wide-box__title__small pl-85">Working example on our Github</h3>
120
- <div class="wide-box__description">Stream video Applet example</div>
121
- </div>
122
- </div>
123
- </a>
124
- </div>
125
- </div>
106
+ :::note[GitHub Example]
107
+ [Stream video Applet example](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/stream)
108
+ :::
126
109
 
127
110
  ## play()
128
111
  Calls the internal player and starts a video stream in correct position.
129
112
 
130
- ::: alert alert--info
113
+ :::info
131
114
  If you want to play a video stream in full screen mode, use x = y = 0 and width = document.documentElement.clientWidth and height = document.documentElement.clientHeight as setup parameters.
132
115
  :::
133
116
 
134
117
  ### Parameters
135
- ::: table-responsive
118
+
136
119
  | Param | Type | Required | Description |
137
120
  | -------------- | --------------------------- | :--------------------------: | --------------------------------------------- |
138
121
  | `uri` | String | <div class="red">Yes</div> | Network address where the stream is available |
@@ -140,11 +123,10 @@ If you want to play a video stream in full screen mode, use x = y = 0 and width
140
123
  | `y` | Number | <div class="red">Yes</div> | Stream y-position on the screen |
141
124
  | `width` | Number | <div class="red">Yes</div> | Stream width on the screen |
142
125
  | `height` | Number | <div class="red">Yes</div> | Stream height on the screen |
143
- | `options` | Object | <div class="red">Yes</div> | Additional options for the stream |
144
- :::
126
+ | `options` | Object | <div class="red">Yes</div> | Additional options for the stream
145
127
 
146
128
  ### Options object
147
- ::: table-responsive
129
+
148
130
  | Key | Type | Required | Description |
149
131
  | ------------ | --------------------------- | :--------------------------: | --------------------------------------------- |
150
132
  | `protocol` | String | <div class="red">Yes</div> | Protocol that the stream is using |
@@ -155,8 +137,7 @@ If you want to play a video stream in full screen mode, use x = y = 0 and width
155
137
  |^^|^^|^^| Default value: 30000 ms |
156
138
  | `volume` | Number | <div class="yellow">No</div> | Volume of the stream |
157
139
  | `trackSelection`| Object | <div class="yellow">No</div> | Track selection options |
158
- | `drm` | Object | <div class="yellow">No</div> | DRM options |
159
- :::
140
+ | `drm` | Object | <div class="yellow">No</div> | DRM options
160
141
 
161
142
  ### Javascript syntax
162
143
  ```javascript
@@ -173,21 +154,9 @@ await sos.stream.play(uri, x, y, width, height, { protocol: 'HTTP', autoReco
173
154
  await sos.stream.play(uri, x, y, width, height, 'HTTP')
174
155
  ```
175
156
 
176
- <div class="row d-flex align-content-stretch force-padding-20">
177
- <div class="col-12 d-flex">
178
- <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/stream">
179
- <div>
180
- <div class="wide-box__image d-flex align-items-center">
181
- <i class="fab fa-github svg-black"></i>
182
- </div>
183
- <div>
184
- <h3 class="wide-box__title wide-box__title__small pl-85">Working example on our Github</h3>
185
- <div class="wide-box__description">Stream video Applet example</div>
186
- </div>
187
- </div>
188
- </a>
189
- </div>
190
- </div>
157
+ :::note[GitHub Example]
158
+ [Stream video Applet example](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/stream)
159
+ :::
191
160
 
192
161
  ## stop()
193
162
  Stops the video stream playback.
@@ -198,15 +167,14 @@ await sos.stream.stop(uri, x, y, width, height);
198
167
  ```
199
168
 
200
169
  ### Parameters:
201
- ::: table-responsive
170
+
202
171
  | Param | Type | Required | Description |
203
172
  | -------------- | --------------------------- | :------------------------: | --------------------------------------------- |
204
173
  | `uri` | String | <div class="red">Yes</div> | Network address where the stream is available |
205
174
  | `x` | Number | <div class="red">Yes</div> | Stream x-position on the screen |
206
175
  | `y` | Number | <div class="red">Yes</div> | Stream y-position on the screen |
207
176
  | `width` | Number | <div class="red">Yes</div> | Stream width on the screen |
208
- | `height` | Number | <div class="red">Yes</div> | Stream height on the screen |
209
- :::
177
+ | `height` | Number | <div class="red">Yes</div> | Stream height on the screen
210
178
 
211
179
  ## getTracks()
212
180
  Get all tracks of the selected stream.
@@ -225,11 +193,10 @@ const tracks = await sos.stream.getTracks(videoId); // Promise<ITrackInfo[]>
225
193
  ```
226
194
 
227
195
  ### Parameters:
228
- ::: table-responsive
196
+
229
197
  | Param | Type | Required | Description |
230
198
  | -------------- | --------------------------- | :------------------------: | --------------------------------------------- |
231
- | `videoId` | Object | <div class="red">Yes</div> | Video ID object of selected stream |
232
- :::
199
+ | `videoId` | Object | <div class="red">Yes</div> | Video ID object of selected stream
233
200
 
234
201
  ### Example of returned value
235
202
  ```javascript
@@ -259,14 +226,13 @@ await sos.stream.selectTrack(videoId, trackType, groupId, trackIndex); // Promis
259
226
  ```
260
227
 
261
228
  ### Parameters:
262
- ::: table-responsive
229
+
263
230
  | Param | Type | Required | Description |
264
231
  | -------------- | --------------------------- | :------------------------: | --------------------------------------------- |
265
232
  | `videoId` | Object | <div class="red">Yes</div> | Video ID object of selected stream |
266
233
  | `trackType` | String | <div class="red">Yes</div> | Track type - `AUDIO`, `VIDEO`, `TEXT` |
267
234
  | `groupId` | String | <div class="red">Yes</div> | Group ID of selected track |
268
- | `trackIndex` | Number | <div class="red">Yes</div> | Index of selected track |
269
- :::
235
+ | `trackIndex` | Number | <div class="red">Yes</div> | Index of selected track
270
236
 
271
237
  ## resetTrack()
272
238
  Reset track of the selected stream.
@@ -278,13 +244,12 @@ await sos.stream.resetTrack(videoId, trackType, groupId); // Promise<void>
278
244
  ```
279
245
 
280
246
  ### Parameters:
281
- ::: table-responsive
247
+
282
248
  | Param | Type | Required | Description |
283
249
  | -------------- | --------------------------- | :------------------------: | --------------------------------------------- |
284
250
  | `videoId` | Object | <div class="red">Yes</div> | Video ID object of selected stream |
285
251
  | `trackType` | String | <div class="red">Yes</div> | Track type - `AUDIO`, `VIDEO`, `TEXT` |
286
- | `groupId` | String | <div class="yellow">No</div> | Group ID of selected track |
287
- :::
252
+ | `groupId` | String | <div class="yellow">No</div> | Group ID of selected track
288
253
 
289
254
  ## Event onConnected()
290
255
  Calls a listener callback everytime `connected` event is emitted.
@@ -514,7 +479,7 @@ onTracksChanged(listener: (event: StreamTracksChangedEvent) => void): void;
514
479
  ## Errors
515
480
  Although we are doing our best, following errors may occur when working with the video stream.
516
481
 
517
- ::: table-responsive
482
+
518
483
  | Code | Type | Message |
519
484
  | ---- | ---- | ------- |
520
485
  | 41401 | AppletStreamError | Invalid stream protocol type: `protocol` |
@@ -523,5 +488,4 @@ Although we are doing our best, following errors may occur when working with the
523
488
  | 51302 | InternalStreamError | Couldn't prepare the stream. |
524
489
  | 51303 | InternalStreamError | Couldn't get stream tracks. |
525
490
  | 51304 | InternalStreamError | Couldn't select stream track. |
526
- | 51305 | InternalStreamError | Couldn't reset stream track. |
527
- :::
491
+ | 51305 | InternalStreamError | Couldn't reset stream track.
@@ -15,9 +15,9 @@ description: "[Content JS API] We know how crucial video is for digital signage.
15
15
  We know how crucial video is for digital signage. So we made it easy. There are several methods you can use for video manipulation.
16
16
 
17
17
  ## All methods/events
18
- ::: table-responsive
18
+
19
19
  | Methods/Events | Description | Supported since |
20
- | ----------------- | ----------- | ------ | :---------------: |
20
+ | ----------------- | ----------- | :---------------: |
21
21
  | `play()` | Start video playing | 1.0.3 |
22
22
  | `prepare()` | Prepare next video | 1.0.3 |
23
23
  | `pause()` | Pause video | 1.0.3 |
@@ -26,13 +26,12 @@ We know how crucial video is for digital signage. So we made it easy. There are
26
26
  | `onceEnded()` | Wait until video ends | 1.0.29 |
27
27
  | `onEnded()` | Event called when video ends | 1.0.3 |
28
28
  | `onError()` | Event called when video emits error | 1.0.3 |
29
- :::
30
29
 
31
- ::: alert alert--warning
30
+ :::warning
32
31
  First 5 parameters (uri, x, y, width, height) are unique identifiers for playing the video using play, stop, resume and pause methods.
33
32
  :::
34
33
 
35
- ::: alert alert--info
34
+ :::info
36
35
  If you want to play video in full screen mode, use x = y = 0 and width = document.documentElement.clientWidth and height = document.documentElement.clientHeight as setup parameters.
37
36
  :::
38
37
 
@@ -44,83 +43,40 @@ If you want to play video in full screen mode, use x = y = 0 and width = documen
44
43
  Play method calls the internal player and starts the video in correct position.
45
44
 
46
45
  ### Parameters
47
- ::: table-responsive
46
+
48
47
  | Param | Type | Required | Description |
49
48
  | ------ | ------ | :--------: | -------- |
50
49
  | `uri` | String | <div class="red">Yes</div> | Address to remote (online) or local video file |
51
50
  | `x` | Number | <div class="red">Yes</div> | x-position for video on screen |
52
51
  | `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
53
52
  | `width` | Number | <div class="red">Yes</div> | Video width on screen |
54
- | `height` | Number | <div class="red">Yes</div> | Video height on screen |
55
- :::
53
+ | `height` | Number | <div class="red">Yes</div> | Video height on screen
56
54
 
57
55
  ### Javascript
58
56
  ```javascript
59
57
  await sos.video.play(uri, x, y, width, height);
60
58
  ```
61
59
 
62
- <div class="row d-flex align-content-stretch force-padding-20">
63
- <div class="col-12 d-flex">
64
- <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/video-loop-one">
65
- <div>
66
- <div class="wide-box__image d-flex align-items-center">
67
- <i class="fab fa-github svg-black"></i>
68
- </div>
69
- <div>
70
- <h3 class="wide-box__title wide-box__title__small pl-85">Play one video in endless loop</h3>
71
- <div class="wide-box__description">Working example on our Github</div>
72
- </div>
73
- </div>
74
- </a>
75
- </div>
76
- </div>
77
-
78
- <div class="row d-flex align-content-stretch force-padding-10">
79
- <div class="col-12 d-flex">
80
- <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/video-multiple">
81
- <div>
82
- <div class="wide-box__image d-flex align-items-center">
83
- <i class="fab fa-github svg-black"></i>
84
- </div>
85
- <div>
86
- <h3 class="wide-box__title wide-box__title__small pl-85">Play multiple videos in endless loop</h3>
87
- <div class="wide-box__description">Working example on our Github</div>
88
- </div>
89
- </div>
90
- </a>
91
- </div>
92
- </div>
93
-
94
- <div class="row d-flex align-content-stretch force-padding-10">
95
- <div class="col-12 d-flex">
96
- <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/video-and-images">
97
- <div>
98
- <div class="wide-box__image d-flex align-items-center">
99
- <i class="fab fa-github svg-black"></i>
100
- </div>
101
- <div>
102
- <h3 class="wide-box__title wide-box__title__small pl-85">Switching video and images in endless loop</h3>
103
- <div class="wide-box__description">Working example on our Github</div>
104
- </div>
105
- </div>
106
- </a>
107
- </div>
108
- </div>
60
+ :::note[GitHub Example]
61
+ - [Play one video in infinite loop](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/video-loop-one)
62
+ - [Play multiple videos in infinite loop](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/video-multiple)
63
+ - [Switching video and images in infinite loop](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/video-and-images)
64
+ :::
109
65
 
110
66
  ## prepare()
111
67
  Prepare method calls the internal player and preload the video into memory.
112
68
 
113
- ::: alert alert--info
69
+ :::info
114
70
  Using `prepare()` is mandatory for gapless playback
115
71
  :::
116
72
 
117
- ::: alert alert--warning
73
+ :::warning
118
74
  `4k` parameter is no longer needed since Front-display v7.5.0, Tizen Core App v2.1.0.
119
75
  `volume` is supported only on the RaspberryPi.
120
76
  :::
121
77
 
122
78
  ### Parameters
123
- ::: table-responsive
79
+
124
80
  | Param | Type | Required | Description |
125
81
  | ------ | ------ | :--------: | -------- |
126
82
  | `uri` | String | <div class="red">Yes</div> | Address to remote /online/ or local video file |
@@ -128,19 +84,17 @@ Using `prepare()` is mandatory for gapless playback
128
84
  | `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
129
85
  | `width` | Number | <div class="red">Yes</div> | Video width on screen |
130
86
  | `height` | Number | <div class="red">Yes</div> | Video height on screen |
131
- | `options` | Object | <div class="yellow">No</div> | Additional video properties |
132
- :::
87
+ | `options` | Object | <div class="yellow">No</div> | Additional video properties
133
88
 
134
89
  ### Options properties
135
- ::: table-responsive
90
+
136
91
  | Property | Type | Required | Description |
137
92
  | ------- | ------ | :------:| -----------|
138
93
  | `4k` | Boolean | <div class="yellow">No</div> | Support for 4k video |
139
94
  |^^|^^|^^| Deprecated since Tizen Core App v2.1.0 |
140
95
  | `background` | Boolean | <div class="yellow">No</div> | Bring video behind the applet html (similar to z-index: -1) |
141
96
  | `volume` | Number | <div class="yellow">No</div> | Adjust volume of playing video itself (doesn't adjust display speaker volume) |
142
- |^^|^^|^^| Supported only on **RaspberryPi** |
143
- :::
97
+ |^^|^^|^^| Supported only on **RaspberryPi**
144
98
 
145
99
  ### Javascript
146
100
  ```javascript
@@ -158,15 +112,14 @@ await sos.video.prepare(uri, x, y, width, height, {
158
112
  All these methods call the internal player. All variables are mandatory in order to ensure video identification.
159
113
 
160
114
  ### Parameters
161
- ::: table-responsive
115
+
162
116
  | Param | Type | Required | Description |
163
117
  | ------ | ------ | :--------: | -------- |
164
118
  | `uri` | String | <div class="red">Yes</div> | Address to remote (online) or local video file |
165
119
  | `x` | Number | <div class="red">Yes</div> | x-position for video on screen |
166
120
  | `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
167
121
  | `width` | Number | <div class="red">Yes</div> | Video width on screen |
168
- | `height` | Number | <div class="red">Yes</div> | Video height on screen |
169
- :::
122
+ | `height` | Number | <div class="red">Yes</div> | Video height on screen
170
123
 
171
124
  ### Javascript
172
125
  ```javascript
@@ -184,15 +137,14 @@ await sos.video.resume(uri, x, y, width, height);
184
137
  Wait until one specific video is ended.
185
138
 
186
139
  ### Parameters
187
- ::: table-responsive
140
+
188
141
  | Param | Type | Required | Description |
189
142
  | ------ | ------ | :--------: | -------- |
190
143
  | `uri` | String | <div class="red">Yes</div> | Address to remote (online) or local video file |
191
144
  | `x` | Number | <div class="red">Yes</div> | x-position for video on screen |
192
145
  | `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
193
146
  | `width` | Number | <div class="red">Yes</div> | Video width on screen |
194
- | `height` | Number | <div class="red">Yes</div> | Video height on screen |
195
- :::
147
+ | `height` | Number | <div class="red">Yes</div> | Video height on screen
196
148
 
197
149
  ### Javascript
198
150
  ```javascript
@@ -205,12 +157,11 @@ All events about played videos can be binded using above mentioned methods. It w
205
157
 
206
158
  Listener method added as argument accepts event object. It contains these properties:
207
159
 
208
- ::: table-responsive
160
+
209
161
  | Property | Description |
210
162
  | ------ | ------ |
211
163
  | `type` | Type of event which can be ended or error string |
212
- | `srcArguments` | Arguments which was passed to play method.<br> Contains uri, x, y, width & height. |
213
- :::
164
+ | `srcArguments` | Arguments which was passed to play method.<br/> Contains uri, x, y, width & height.
214
165
 
215
166
  ### Javascript
216
167
  ```javascript
@@ -270,7 +221,7 @@ resume(
270
221
  ## Errors
271
222
  Although we are doing our best, following errors may occur when working with the video stream.
272
223
 
273
- ::: table-responsive
224
+
274
225
  | Code | Type | Message |
275
226
  | ---- | ---- | ------- |
276
227
  | 41501 | AppletVideoError | This video was not played yet. The arguments: `arguments` |
@@ -278,5 +229,4 @@ Although we are doing our best, following errors may occur when working with the
278
229
  | 51502 | InternalVideoError | Couldn't prepare the video. |
279
230
  | 51503 | InternalVideoError | Couldn't stop the video. |
280
231
  | 51504 | InternalVideoError | Couldn't pause the video. |
281
- | 51505 | InternalVideoError | Couldn't resume the video. |
282
- :::
232
+ | 51505 | InternalVideoError | Couldn't resume the video.
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](applet-basics.md)
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-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-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)