@signageos/front-applet 8.1.1 → 8.1.2
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.
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/sos/fileSystem.md +12 -12
- package/docs/sos/index.md +36 -12
- package/docs/sos/offline/cache.md +6 -6
- package/docs/sos/stream.md +1172 -37
- package/docs/sos/sync.md +2 -2
- package/docs/sos/video.md +515 -22
- package/docs/sos_management/security.md +4 -2
- package/docs/sos_management/wifi.md +9 -9
- package/es6/FrontApplet/FrontApplet.d.ts +31 -7
- package/es6/FrontApplet/FrontApplet.js +32 -8
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Stream/IStreamTrackInfo.d.ts +34 -0
- package/es6/FrontApplet/Stream/Stream.d.ts +245 -20
- package/es6/FrontApplet/Stream/Stream.js +245 -20
- package/es6/FrontApplet/Stream/Stream.js.map +1 -1
- package/es6/FrontApplet/Stream/StreamProtocol.d.ts +4 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js +4 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -1
- package/es6/FrontApplet/Stream/streamEventProperties.d.ts +11 -1
- package/es6/FrontApplet/Stream/streamEvents.d.ts +26 -0
- package/es6/FrontApplet/Video/IOptions.d.ts +41 -0
- package/es6/FrontApplet/Video/IVideoEvent.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -1
- package/es6/FrontApplet/Video/IVideoProperties.d.ts +3 -0
- package/es6/FrontApplet/Video/Video.d.ts +256 -19
- package/es6/FrontApplet/Video/Video.js +258 -22
- package/es6/FrontApplet/Video/Video.js.map +1 -1
- package/package.json +1 -1
package/docs/sos/fileSystem.md
CHANGED
|
@@ -46,7 +46,7 @@ interface IStorageUnit {
|
|
|
46
46
|
|
|
47
47
|
#### Possible errors
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
If the parent directory does not exist or the `filePath` is a directory.
|
|
50
50
|
|
|
51
51
|
<Separator />
|
|
52
52
|
|
|
@@ -84,7 +84,7 @@ interface ICopyFileOptions {
|
|
|
84
84
|
|
|
85
85
|
#### Possible errors
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
If the source file does not exists or parent of the destination file path does not exists. It also throws if the
|
|
88
88
|
`options.overwrite` is not set and the destination file path already exists.
|
|
89
89
|
|
|
90
90
|
<Separator />
|
|
@@ -143,7 +143,7 @@ interface IStorageUnit {
|
|
|
143
143
|
|
|
144
144
|
#### Possible errors
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
If the directory already exists or its parent directory does not exist.
|
|
147
147
|
|
|
148
148
|
<Separator />
|
|
149
149
|
|
|
@@ -171,7 +171,7 @@ interface IStorageUnit {
|
|
|
171
171
|
|
|
172
172
|
#### Possible errors
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
If the file does not exists or if `recursive` is set to false and the file path is a directory.
|
|
175
175
|
|
|
176
176
|
<Separator />
|
|
177
177
|
|
|
@@ -241,7 +241,7 @@ interface IHeaders {
|
|
|
241
241
|
|
|
242
242
|
#### Possible errors
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
If the network request fails, parent directory does not exist, or the file path is a directory.
|
|
245
245
|
|
|
246
246
|
<Separator />
|
|
247
247
|
|
|
@@ -293,7 +293,7 @@ interface IStorageUnit {
|
|
|
293
293
|
|
|
294
294
|
#### Possible errors
|
|
295
295
|
|
|
296
|
-
|
|
296
|
+
If the archive file path does not exist, it is not a valid archive file or the destination directory does not exist.
|
|
297
297
|
|
|
298
298
|
<Separator />
|
|
299
299
|
|
|
@@ -359,7 +359,7 @@ type AnyString = string & {};
|
|
|
359
359
|
|
|
360
360
|
#### Possible errors
|
|
361
361
|
|
|
362
|
-
|
|
362
|
+
If the file does not exist or it is a directory.
|
|
363
363
|
|
|
364
364
|
<Separator />
|
|
365
365
|
|
|
@@ -387,7 +387,7 @@ interface IStorageUnit {
|
|
|
387
387
|
|
|
388
388
|
#### Possible errors
|
|
389
389
|
|
|
390
|
-
|
|
390
|
+
If the file path does not exist.
|
|
391
391
|
|
|
392
392
|
<Separator />
|
|
393
393
|
|
|
@@ -439,7 +439,7 @@ interface IStorageUnit {
|
|
|
439
439
|
|
|
440
440
|
#### Possible errors
|
|
441
441
|
|
|
442
|
-
|
|
442
|
+
If the path does not exist or it is a file.
|
|
443
443
|
|
|
444
444
|
<Separator />
|
|
445
445
|
|
|
@@ -510,7 +510,7 @@ interface IMoveFileOptions {
|
|
|
510
510
|
|
|
511
511
|
#### Possible errors
|
|
512
512
|
|
|
513
|
-
|
|
513
|
+
If the source file does not exists or parent of the destination file path does not exists. It also throws if the
|
|
514
514
|
`options.overwrite` is not set and the destination file path already exists.
|
|
515
515
|
|
|
516
516
|
<Separator />
|
|
@@ -550,7 +550,7 @@ interface IStorageUnit {
|
|
|
550
550
|
|
|
551
551
|
#### Possible errors
|
|
552
552
|
|
|
553
|
-
|
|
553
|
+
If the file does not exist.
|
|
554
554
|
|
|
555
555
|
<Separator />
|
|
556
556
|
|
|
@@ -614,7 +614,7 @@ interface IStorageUnit {
|
|
|
614
614
|
|
|
615
615
|
#### Possible errors
|
|
616
616
|
|
|
617
|
-
|
|
617
|
+
If the parent directory does not exist or the `filePath` is a directory.
|
|
618
618
|
|
|
619
619
|
## API Example
|
|
620
620
|
|
package/docs/sos/index.md
CHANGED
|
@@ -4,11 +4,22 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# sos
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</Admonition>
|
|
7
|
+
The `sos` API groups together all functionality the \@signageos/front-applet offers. This is a basic object that provides you with access to
|
|
8
|
+
all the applet functionality, such as device information, display control, video playback, and more.
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
:::warning
|
|
11
|
+
All calls to the sos object need to happen after `sos.onReady()` is resolved. After the sOS object is ready, there are global properties available, which can be used for applet customization and device identification.
|
|
12
|
+
:::
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
// Simple example of using the sos API to play a video.
|
|
16
|
+
import sos from '@signageos/front-applet';
|
|
17
|
+
|
|
18
|
+
sos.onReady().then(async function () {
|
|
19
|
+
startYourApplet(); // Example method to run
|
|
20
|
+
// Any other code
|
|
21
|
+
}
|
|
22
|
+
```
|
|
12
23
|
|
|
13
24
|
## Properties
|
|
14
25
|
|
|
@@ -23,7 +34,7 @@ readonly appletVersion: string;
|
|
|
23
34
|
### authHash
|
|
24
35
|
|
|
25
36
|
<Admonition type="info" icon="" title="">
|
|
26
|
-
Learn more about using this API [here](https://developers.signageos.io/docs/
|
|
37
|
+
Learn more about using this API [here](https://developers.signageos.io/docs/sos-guides/device-identification)
|
|
27
38
|
</Admonition>
|
|
28
39
|
|
|
29
40
|
The `authHash` property is an alternative device identifier, which is designed for secure pairing and locating devices through
|
|
@@ -39,11 +50,7 @@ readonly authHash: string;
|
|
|
39
50
|
|
|
40
51
|
### config
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
Learn more about using this API [here](https://developers.signageos.io/docs/applets/configuration/)
|
|
44
|
-
</Admonition>
|
|
45
|
-
|
|
46
|
-
The `config` property is a Key-value dictionary of the applet configuration.
|
|
53
|
+
The `config` property is a Key-value dictionary of the applet configuration. It is assigned on the device with timing via Box or SDK/Rest API.
|
|
47
54
|
|
|
48
55
|
```ts expandable
|
|
49
56
|
readonly config: Record<string, number | string | boolean>;
|
|
@@ -60,6 +67,16 @@ which is resolved at the same time as the listener.
|
|
|
60
67
|
onReady(listener?: () => void): Promise<void>;
|
|
61
68
|
```
|
|
62
69
|
|
|
70
|
+
#### Params
|
|
71
|
+
|
|
72
|
+
| Name | Type | Description |
|
|
73
|
+
|-------------------------|--------------|--------------------------------------------------------------|
|
|
74
|
+
| `listener` *(optional)* | `() => void` | Optional listener which is called when the sos API is ready. |
|
|
75
|
+
|
|
76
|
+
#### Return value
|
|
77
|
+
|
|
78
|
+
Promise which is resolved when the sos API is ready.
|
|
79
|
+
|
|
63
80
|
#### Example
|
|
64
81
|
|
|
65
82
|
```ts
|
|
@@ -76,12 +93,16 @@ sos.onReady(async function () {
|
|
|
76
93
|
|
|
77
94
|
### refresh()
|
|
78
95
|
|
|
79
|
-
The `refresh()` method initializes refresh of the applet. Similar to window.location.reload(), but the applet is not downloaded again.
|
|
96
|
+
The `refresh()` method initializes the refresh of the applet. Similar to window.location.reload(), but the applet is not downloaded again.
|
|
80
97
|
|
|
81
98
|
```ts expandable
|
|
82
99
|
refresh(): Promise<void>;
|
|
83
100
|
```
|
|
84
101
|
|
|
102
|
+
#### Return value
|
|
103
|
+
|
|
104
|
+
Promise that is resolved when the refresh is completed.
|
|
105
|
+
|
|
85
106
|
#### Example
|
|
86
107
|
|
|
87
108
|
```ts
|
|
@@ -106,5 +127,8 @@ restore(): void;
|
|
|
106
127
|
#### Example
|
|
107
128
|
|
|
108
129
|
```ts
|
|
109
|
-
sos.
|
|
130
|
+
sos.onReady(async function () {
|
|
131
|
+
// Some function which is called when the applet is ready
|
|
132
|
+
sos.restore();
|
|
133
|
+
});
|
|
110
134
|
```
|
|
@@ -28,7 +28,7 @@ decompressFile(uid: string, destinationUid: string, method: 'zip'): Promise<void
|
|
|
28
28
|
|
|
29
29
|
#### Possible errors
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
If the uid does not exist.
|
|
32
32
|
|
|
33
33
|
<Separator />
|
|
34
34
|
|
|
@@ -56,7 +56,7 @@ deleteFile(uid: string): Promise<void>;
|
|
|
56
56
|
|
|
57
57
|
#### Possible errors
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
If the uid does not exist.
|
|
60
60
|
|
|
61
61
|
<Separator />
|
|
62
62
|
|
|
@@ -75,7 +75,7 @@ type AnyString = string & {};
|
|
|
75
75
|
|
|
76
76
|
#### Possible errors
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
If the uid does not exist or the hashing algorithm is not supported.
|
|
79
79
|
|
|
80
80
|
<Separator />
|
|
81
81
|
|
|
@@ -132,7 +132,7 @@ interface IFile {
|
|
|
132
132
|
|
|
133
133
|
#### Possible errors
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
If the uid does not exists
|
|
136
136
|
|
|
137
137
|
<Separator />
|
|
138
138
|
|
|
@@ -185,7 +185,7 @@ saveFile(uid: string, uri: string, headers?: {
|
|
|
185
185
|
|
|
186
186
|
#### Possible errors
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
If the network request fails or a file with the same uid is already cached
|
|
189
189
|
|
|
190
190
|
<Separator />
|
|
191
191
|
|
|
@@ -204,4 +204,4 @@ type AnyString = string & {};
|
|
|
204
204
|
|
|
205
205
|
#### Possible errors
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
If the uid does not exist or the hashing algorithm is not supported.
|