@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
@@ -15,60 +15,45 @@ description: "[Content JS API] Display content from another device over HDMI, Di
15
15
  Display content from another device over HDMI, Display Port, or other port. PIP (Picture in Picture) functionality allows you to display content from the internal port while keeping signageOS on.
16
16
 
17
17
  ## All methods
18
- ::: table-responsive
18
+
19
19
  | Methods | Description | Supported since |
20
20
  | ----------------- | ----------- | :---------------: |
21
21
  | `play()` | Method for starting stream | 1.0.18 |
22
22
  | `stop()` | Method stops using the internal port. | 1.0.18 |
23
- :::
24
23
 
25
24
  ## play()
26
25
  Method uses the same API as [video streams](/api/js/content/js-video-stream). Instead of URL (for stream), **specify an URI of the port** to display.
27
26
 
28
27
  ### Parameters
29
- ::: table-responsive
28
+
30
29
  | Param | Type | Required |Description |
31
30
  | -------------- | -------------------| :----------: | ---------------------------- |
32
31
  | `uri` | String | <div class="red">Yes</div> | Internal port URI |
33
32
  | `x` | Number | <div class="red">Yes</div> | x-position for video on screen |
34
33
  | `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
35
34
  | `width` | Number | <div class="red">Yes</div> | Video width on screen |
36
- | `height` | Number | <div class="red">Yes</div> | Video height on screen |
37
- :::
35
+ | `height` | Number | <div class="red">Yes</div> | Video height on screen
38
36
 
39
37
  ### Javascript example
40
38
  ```javascript
41
39
  await sos.stream.play(uri, x, y, width, height);
42
40
  ```
43
41
 
44
- <div class="row d-flex align-content-stretch force-padding-20">
45
- <div class="col-12 d-flex">
46
- <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-hdmi-port">
47
- <div>
48
- <div class="wide-box__image d-flex align-items-center">
49
- <i class="fab fa-github svg-black"></i>
50
- </div>
51
- <div>
52
- <h3 class="wide-box__title wide-box__title__small pl-85">Stream HDMI port Applet example</h3>
53
- <div class="wide-box__description">Working example on our Github</div>
54
- </div>
55
- </div>
56
- </a>
57
- </div>
58
- </div>
42
+ :::note[GitHub Example]
43
+ [Stream HDMI port Applet example](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/stream-hdmi-port)
44
+ :::
59
45
 
60
46
  ## Valid URI values
61
47
 
62
- ::: table-responsive
48
+
63
49
  | Value | Description |
64
50
  | ----------------------- | ------------------------------- |
65
51
  | `internal://hdmi<number>` | HDMI |
66
52
  | `internal://dp` | DisplayPort |
67
53
  | `internal://dvi` | DVI |
68
- | `internal://pc` | PC or VGA |
69
- :::
54
+ | `internal://pc` | PC or VGA
70
55
 
71
- ::: alert alert--warning
56
+ :::warning
72
57
  `<number>` has to be a value between 1 - 4, depending on which of the available HDMI ports you want to use.
73
58
  :::
74
59
 
@@ -76,15 +61,14 @@ await sos.stream.play(uri, x, y, width, height);
76
61
  Method stops using the internal port.
77
62
 
78
63
  ### Parameters:
79
- ::: table-responsive
64
+
80
65
  | Param | Type | Required |Description |
81
66
  | -------------- | -----------------| :------------: | ---------------------------- |
82
67
  | `uri` | String | <div class="red">Yes</div> | Internal port URI |
83
68
  | `x` | Number | <div class="red">Yes</div> | x-position for video on screen |
84
69
  | `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
85
70
  | `width` | Number | <div class="red">Yes</div> | Video width on screen |
86
- | `height` | Number | <div class="red">Yes</div> | Video height on screen |
87
- :::
71
+ | `height` | Number | <div class="red">Yes</div> | Video height on screen
88
72
 
89
73
  ### Javascript example
90
74
  ```javascript
@@ -94,13 +78,12 @@ await sos.stream.stop(uri, x, y, width, height);
94
78
  ## Internal port events
95
79
  API reacts to events related to changes in internal port status. Events are only emitted for a currently playing internal port.
96
80
 
97
- ::: table-responsive
81
+
98
82
  | Event | Description |
99
83
  | ----------------------------- | ----------------------------------------------------------------------------------------------- |
100
84
  | `disconnected()` | Emmited when the port is disconnected or does not receive any signal |
101
85
  | `connected()` | Emmited when the port is re-connected or starts receiving signal again after being disconnected |
102
- | `error()` | Emmited when an error occurs, is emmited only once |
103
- :::
86
+ | `error()` | Emmited when an error occurs, is emmited only once
104
87
 
105
88
  ## Usage with Typescript
106
89
  You can also use all these methods with [signageOS TypeScript](https://docs.signageos.io/hc/en-us/articles/4405069154962#signageos-typescript).
@@ -141,9 +124,8 @@ onError(listener: (event: {
141
124
  ## Errors
142
125
  Although we are doing our best, following errors may occur when playing content from the internal ports.
143
126
 
144
- ::: table-responsive
127
+
145
128
  | Code | Type | Message |
146
129
  | ---- | ---- | ------- |
147
130
  | 51501 | InternalVideoError | Couldn't play the video. |
148
- | 51503 | InternalVideoError | Couldn't stop the video. |
149
- :::
131
+ | 51503 | InternalVideoError | Couldn't stop the video.
@@ -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.