@signageos/front-applet 8.0.2 → 8.0.3
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.map +1 -1
- package/docs/fpath/index.md +1 -1
- package/docs/sos/browser.md +27 -17
- package/docs/sos/command.md +21 -9
- package/docs/sos/debug.md +17 -0
- package/docs/sos/deviceInfo.md +26 -0
- package/docs/sos/display.md +17 -0
- package/docs/sos/fileSystem.md +47 -1
- package/docs/sos/hardware/index.md +36 -1
- package/docs/sos/hardware/led.md +11 -0
- package/docs/sos/index.md +14 -12
- package/docs/sos/input.md +13 -0
- package/docs/sos/monitors.md +16 -1
- package/docs/sos/native/mdc.md +0 -9
- package/docs/sos/offline/index.md +0 -14
- package/docs/sos/osd.md +15 -0
- package/docs/sos/proofOfPlay.md +14 -21
- package/docs/sos/sync.md +3 -17
- package/docs/sos_management/audio.md +14 -1
- package/docs/sos_management/firmware.md +26 -0
- package/docs/sos_management/index.md +1 -1
- package/docs/sos_management/network.md +3 -3
- package/docs/sos_management/package.md +7 -16
- package/docs/sos_management/power.md +49 -1
- package/docs/sos_management/proxy.md +25 -0
- package/docs/sos_management/remoteControl.md +36 -0
- package/docs/sos_management/screen.md +0 -18
- package/docs/sos_management/time.md +45 -5
- package/es6/FrontApplet/FrontApplet.d.ts +8 -2
- package/es6/FrontApplet/FrontApplet.js +8 -2
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +14 -0
- package/es6/FrontApplet/Management/Firmware/Firmware.js +8 -0
- package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
- package/es6/FrontApplet/Management/Package/Package.d.ts +0 -8
- package/es6/FrontApplet/Management/Package/Package.js +0 -8
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +24 -0
- package/es6/FrontApplet/Management/Power/Power.js +25 -1
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +13 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.js +13 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +18 -0
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +18 -0
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
- package/es6/FrontApplet/Management/Time/Time.d.ts +15 -3
- package/es6/FrontApplet/Management/Time/Time.js +9 -0
- package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
- package/es6/FrontApplet/Monitors/Monitors.d.ts +1 -1
- package/es6/FrontApplet/Monitors/Monitors.js +1 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +0 -10
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +0 -10
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
- package/es6/fpath.d.ts +1 -1
- package/es6/fpath.js +1 -1
- package/package.json +1 -1
package/docs/fpath/index.md
CHANGED
|
@@ -6,7 +6,7 @@ sidebar_position: 99
|
|
|
6
6
|
|
|
7
7
|
fpath utility mirrors node [path](https://nodejs.org/docs/latest/api/path.html)
|
|
8
8
|
module, but accepts IFilePath type instead of strings. It is useful when
|
|
9
|
-
working with [sos.
|
|
9
|
+
working with [sos.fileSystem](/sdk/sos/fileSystem).
|
|
10
10
|
|
|
11
11
|
Not implemented functions:
|
|
12
12
|
- format
|
package/docs/sos/browser.md
CHANGED
|
@@ -19,22 +19,6 @@ The `sos.browser` API groups together methods for working with the integrated we
|
|
|
19
19
|
|
|
20
20
|
:::
|
|
21
21
|
|
|
22
|
-
```ts
|
|
23
|
-
sos.browser.open('https://www.signageos.io', {
|
|
24
|
-
aclDomains: ['google.com', 'yahoo.com'],
|
|
25
|
-
aclMode: 'blacklist', // or 'whitelist'
|
|
26
|
-
readOnlyAddressBar: true,
|
|
27
|
-
coordinates: { // Supported only on Linux and Android
|
|
28
|
-
x: 0,
|
|
29
|
-
y: 0,
|
|
30
|
-
height: 500,
|
|
31
|
-
width: 500,
|
|
32
|
-
},
|
|
33
|
-
// theme: { ... }
|
|
34
|
-
headlessMode: false,
|
|
35
|
-
});
|
|
36
|
-
```
|
|
37
|
-
|
|
38
22
|
## Methods
|
|
39
23
|
|
|
40
24
|
### close()
|
|
@@ -177,7 +161,7 @@ sos.browser.open('https://www.signageos.io', {
|
|
|
177
161
|
|
|
178
162
|
### ~openLink()~
|
|
179
163
|
|
|
180
|
-
:::danger
|
|
164
|
+
:::danger Deprecated
|
|
181
165
|
|
|
182
166
|
This method was deprecated. use `sos.browser.open()` instead
|
|
183
167
|
|
|
@@ -227,4 +211,30 @@ type ITheme = {
|
|
|
227
211
|
};
|
|
228
212
|
};
|
|
229
213
|
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## API Example
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
import { sos } from '@signageos/front-applet';
|
|
220
|
+
|
|
221
|
+
void sos.onReady(async () => {
|
|
222
|
+
await sos.browser.open('https://www.signageos.io', {
|
|
223
|
+
aclDomains: ['google.com', 'yahoo.com'],
|
|
224
|
+
aclMode: 'blacklist', // or 'whitelist'
|
|
225
|
+
readOnlyAddressBar: true,
|
|
226
|
+
coordinates: {
|
|
227
|
+
// Supported only on Linux and Android
|
|
228
|
+
x: 0,
|
|
229
|
+
y: 0,
|
|
230
|
+
height: 500,
|
|
231
|
+
width: 500,
|
|
232
|
+
},
|
|
233
|
+
// theme: { ... } // supported only on Android
|
|
234
|
+
headlessMode: false, // supported only on Android
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
await sos.browser.close(); // Close the browser
|
|
238
|
+
});
|
|
239
|
+
|
|
230
240
|
```
|
package/docs/sos/command.md
CHANGED
|
@@ -6,14 +6,6 @@ sidebar_position: 0
|
|
|
6
6
|
|
|
7
7
|
The `sos.command` API groups together methods for sending logs and receiving commands from signageOS.
|
|
8
8
|
|
|
9
|
-
```ts
|
|
10
|
-
await sos.command.dispatch({
|
|
11
|
-
type: 'Files.StartLoading',
|
|
12
|
-
fileName: 'my-file',
|
|
13
|
-
fileType: 'txt'
|
|
14
|
-
});
|
|
15
|
-
```
|
|
16
|
-
|
|
17
9
|
## Methods
|
|
18
10
|
|
|
19
11
|
### dispatch()
|
|
@@ -77,4 +69,24 @@ interface ICommand {
|
|
|
77
69
|
|
|
78
70
|
- [Receiving commands](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving)
|
|
79
71
|
|
|
80
|
-
:::
|
|
72
|
+
:::
|
|
73
|
+
|
|
74
|
+
## API Example
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { sos } from '@signageos/front-applet';
|
|
78
|
+
|
|
79
|
+
void sos.onReady(async () => {
|
|
80
|
+
/* Example of dispatching information about file download */
|
|
81
|
+
await sos.command.dispatch({
|
|
82
|
+
type: 'Files.StartLoading', // mandatory *type* with custom value
|
|
83
|
+
fileName: 'my-file', // custom parameter and value
|
|
84
|
+
fileType: 'txt', // custom parameter and value
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
sos.command.onCommand((command) => {
|
|
88
|
+
console.log(`new command ${command.type} received, with data:`, command.command);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
```
|
package/docs/sos/debug.md
CHANGED
|
@@ -26,4 +26,21 @@ The `onRemoteDebugChanged()` method sets up a listener, which is called whenever
|
|
|
26
26
|
onRemoteDebugChanged(listener: (data: {
|
|
27
27
|
enabled: boolean;
|
|
28
28
|
}) => void): void;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API Example
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { sos } from '@signageos/front-applet';
|
|
35
|
+
|
|
36
|
+
void sos.onReady(async () => {
|
|
37
|
+
if (await sos.debug.isRemoteDebugEnabled()) {
|
|
38
|
+
console.log('Remote debug is turned on');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
sos.debug.onRemoteDebugChanged((enabled) => {
|
|
42
|
+
console.log('Weinre debug is', { enabled });
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
29
46
|
```
|
package/docs/sos/deviceInfo.md
CHANGED
|
@@ -50,4 +50,30 @@ interface IOrganizationTag {
|
|
|
50
50
|
name: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## API Example
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { sos } from '@signageos/front-applet';
|
|
59
|
+
|
|
60
|
+
void sos.onReady(async () => {
|
|
61
|
+
await printLocation();
|
|
62
|
+
await printTags();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const printLocation = async () => {
|
|
66
|
+
const { name, customId, description } = (await sos.deviceInfo.getLocation()) ?? {};
|
|
67
|
+
|
|
68
|
+
console.log('Location: ', { name, customId, description });
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const printTags = async () => {
|
|
72
|
+
const tags = await sos.deviceInfo.getOrganizationTags();
|
|
73
|
+
|
|
74
|
+
for (const { name } of tags) {
|
|
75
|
+
console.log('Tag: ', name);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
53
79
|
```
|
package/docs/sos/display.md
CHANGED
|
@@ -22,4 +22,21 @@ type DisplayCapability = 'FILE_SYSTEM_INTERNAL_STORAGE' | 'FILE_SYSTEM_EXTERNAL_
|
|
|
22
22
|
|
|
23
23
|
type AnyString = string & {};
|
|
24
24
|
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## API Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { sos } from '@signageos/front-applet';
|
|
31
|
+
|
|
32
|
+
void sos.onReady(async () => {
|
|
33
|
+
const supports = await sos.display.supports('SERIAL');
|
|
34
|
+
|
|
35
|
+
if (supports) {
|
|
36
|
+
console.log('This device supports serial port.');
|
|
37
|
+
} else {
|
|
38
|
+
console.log('This device does NOT support serial port.');
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
25
42
|
```
|
package/docs/sos/fileSystem.md
CHANGED
|
@@ -599,4 +599,50 @@ interface IStorageUnit {
|
|
|
599
599
|
|
|
600
600
|
#### Possible errors
|
|
601
601
|
|
|
602
|
-
The method throws an error if the parent directory does not exist or the `filePath` is a directory.
|
|
602
|
+
The method throws an error if the parent directory does not exist or the `filePath` is a directory.
|
|
603
|
+
|
|
604
|
+
## API Example
|
|
605
|
+
|
|
606
|
+
```ts
|
|
607
|
+
import { sos, fpath } from '@signageos/front-applet';
|
|
608
|
+
import { IFilePath } from '@signageos/front-applet/es6/FrontApplet/FileSystem/types';
|
|
609
|
+
|
|
610
|
+
void sos.onReady(async () => {
|
|
611
|
+
const [internal] = await sos.fileSystem.listInternalStorageUnits();
|
|
612
|
+
|
|
613
|
+
const root: IFilePath = {
|
|
614
|
+
storageUnit: internal,
|
|
615
|
+
filePath: '', // empty string points to root directory
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
// list files in the root directory
|
|
619
|
+
const contents = await sos.fileSystem.listFiles(root);
|
|
620
|
+
|
|
621
|
+
// print files from the root directory
|
|
622
|
+
for (const entries of contents) {
|
|
623
|
+
if (await sos.fileSystem.isDirectory(entries)) {
|
|
624
|
+
console.log(`${entries.filePath} (directory)`);
|
|
625
|
+
} else {
|
|
626
|
+
console.log(`${entries.filePath} (file)`);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
// write data into a file
|
|
631
|
+
const writePath = fpath.join(root, 'value.json');
|
|
632
|
+
await sos.fileSystem.writeFile(writePath, JSON.stringify({ data: 'Lorem ipsum dolor sit amet' }));
|
|
633
|
+
|
|
634
|
+
// download a file from the internet and play it
|
|
635
|
+
const downloadPath = fpath.join(root, 'video.mp4');
|
|
636
|
+
await sos.fileSystem.downloadFile(
|
|
637
|
+
downloadPath,
|
|
638
|
+
'https://static.signageos.io/assets/test-videos-03_AME/video-test-03_15s_1920x1080_2fe7b039750a134aeac1c0a515710007.mp4',
|
|
639
|
+
);
|
|
640
|
+
const file = await sos.fileSystem.getFile(downloadPath);
|
|
641
|
+
|
|
642
|
+
if (file) {
|
|
643
|
+
await sos.video.prepare(file.filePath, 0, 0, 1920, 1080);
|
|
644
|
+
await sos.video.play(file.filePath, 0, 0, 1920, 1080);
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
```
|
|
@@ -69,4 +69,39 @@ interface ISerialPort {
|
|
|
69
69
|
| `options.parity` *(optional)* | `Parity` | Specifies the form of error checking, whether (or what) extra bits are added to a byte. |
|
|
70
70
|
| `options.databits` *(optional)* | `number` | Specifies the number of bits in a byte. |
|
|
71
71
|
| `options.stopbits` *(optional)* | `number` | Specifies the number of bits used to signal the end of a communication packet. |
|
|
72
|
-
| `options.rtscts` *(optional)* | `boolean` | Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign. |
|
|
72
|
+
| `options.rtscts` *(optional)* | `boolean` | Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign. |
|
|
73
|
+
|
|
74
|
+
## API Example
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { sos } from '@signageos/front-applet';
|
|
78
|
+
|
|
79
|
+
void sos.onReady(async () => {
|
|
80
|
+
// Open default serial port based platform
|
|
81
|
+
const serialPort = await sos.hardware.openSerialPort({
|
|
82
|
+
baudRate: 115200,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
await serialPort.close();
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
void sos.onReady(async () => {
|
|
89
|
+
// Open specific serial port
|
|
90
|
+
const serialPort = await sos.hardware.openSerialPort({
|
|
91
|
+
device: '/dev/ttyUSB0',
|
|
92
|
+
baudRate: 115200,
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
serialPort.onData((data) => {
|
|
96
|
+
const dataString = [...data].map((char) => String.fromCharCode(char)).join('');
|
|
97
|
+
console.log(dataString);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
await serialPort.write('68656c6c6f'); // hexadecimal string
|
|
101
|
+
await serialPort.write([10, 20, 30, 40]); // array of numbers
|
|
102
|
+
await serialPort.write(Uint8Array.from([10, 20, 30, 40])); // Uint8Array
|
|
103
|
+
|
|
104
|
+
await serialPort.close();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
```
|
package/docs/sos/hardware/led.md
CHANGED
|
@@ -15,4 +15,15 @@ The `setColor()` methods sets the LED color (if string is passed) or disabled (i
|
|
|
15
15
|
|
|
16
16
|
```ts expandable
|
|
17
17
|
setColor(color: string | null): Promise<void>;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## API Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { sos } from '@signageos/front-applet';
|
|
24
|
+
|
|
25
|
+
void sos.onReady(async () => {
|
|
26
|
+
await sos.hardware.led.setColor('#00FF00'); // For GREEN light
|
|
27
|
+
});
|
|
28
|
+
|
|
18
29
|
```
|
package/docs/sos/index.md
CHANGED
|
@@ -8,17 +8,7 @@ sidebar_position: 0
|
|
|
8
8
|
Learn more about using this API [here](https://developers.signageos.io/docs/applets/getting-started/#using-the-sos-sdk)
|
|
9
9
|
</Admonition>
|
|
10
10
|
|
|
11
|
-
The `sos` API groups together all functionality the
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
sos.onReady().then(async function () {
|
|
15
|
-
console.log(await sos.app.getType());
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
sos.onReady(async function () {
|
|
19
|
-
console.log(await sos.app.getType());
|
|
20
|
-
});
|
|
21
|
-
```
|
|
11
|
+
The `sos` API groups together all functionality the \@signageos/front-applet offers.
|
|
22
12
|
|
|
23
13
|
## Properties
|
|
24
14
|
|
|
@@ -92,6 +82,12 @@ The `refresh()` method initializes refresh of the applet. Similar to window.loca
|
|
|
92
82
|
refresh(): Promise<void>;
|
|
93
83
|
```
|
|
94
84
|
|
|
85
|
+
#### Example
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
await sos.refresh();
|
|
89
|
+
```
|
|
90
|
+
|
|
95
91
|
<Separator />
|
|
96
92
|
|
|
97
93
|
### restore()
|
|
@@ -100,9 +96,15 @@ The `restore()` method clears all previously played videos, streams, clear displ
|
|
|
100
96
|
is playing a loop with some specified duration. This method should be called always when the loop is changed. It will clear all
|
|
101
97
|
previously played videos, streams, clear display views, and notify for garbage collection.
|
|
102
98
|
|
|
103
|
-
|
|
99
|
+
It stops all video playback and clears out the memory. The following function should be triggered only in a case the whole playback
|
|
104
100
|
needs to be restarted as it's completely switching the playback 'loop/playlist'.
|
|
105
101
|
|
|
106
102
|
```ts expandable
|
|
107
103
|
restore(): void;
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Example
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
sos.restore();
|
|
108
110
|
```
|
package/docs/sos/input.md
CHANGED
|
@@ -74,4 +74,17 @@ The `removeEventListeners()` method removes all event listeners bind on `sos.inp
|
|
|
74
74
|
|
|
75
75
|
```ts expandable
|
|
76
76
|
removeEventListeners(): void;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## API Example
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { sos } from '@signageos/front-applet';
|
|
83
|
+
|
|
84
|
+
void sos.onReady(async () => {
|
|
85
|
+
sos.input.onKeyUp((keyUpEvent) => {
|
|
86
|
+
console.log(`Pressed: ${keyUpEvent.keyCode} (${keyUpEvent.keyName})`);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
77
90
|
```
|
package/docs/sos/monitors.md
CHANGED
|
@@ -4,7 +4,7 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# monitors
|
|
6
6
|
|
|
7
|
-
The `sos.
|
|
7
|
+
The `sos.monitors` API groups together methods for providing information about monitors connected to the device.
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
@@ -22,4 +22,19 @@ interface IConnectedMonitor {
|
|
|
22
22
|
firmware?: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## API Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { sos } from '@signageos/front-applet';
|
|
31
|
+
|
|
32
|
+
void sos.onReady(async () => {
|
|
33
|
+
const monitors = await sos.monitors.getList();
|
|
34
|
+
|
|
35
|
+
for (const { model, manufacturer, serial } of monitors) {
|
|
36
|
+
console.log('Connected monitor: ', { model, manufacturer, serial });
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
25
40
|
```
|
package/docs/sos/native/mdc.md
CHANGED
|
@@ -18,15 +18,6 @@ You can ensure that the device supports MDC commands via `sos.management.support
|
|
|
18
18
|
|
|
19
19
|
:::
|
|
20
20
|
|
|
21
|
-
```ts
|
|
22
|
-
await sos.native.mdc.sendOne('localhost', CodesMDC.BRIGHTNESS_CONTROL); // Promise<IMDCResponse>
|
|
23
|
-
await sos.native.mdc.sendOne('192.168.0.10', CodesMDC.VOLUME_CONTROL, [50]); // Promise<IMDCResponse>
|
|
24
|
-
await sos.native.mdc.sendOne('192.168.0.10', CodesMDC.PICTURE_CONTROL, [0x54, 0x03]); // Promise<IMDCResponse>
|
|
25
|
-
|
|
26
|
-
// You can also send custom number if we don't have predefined command in our enum
|
|
27
|
-
await sos.native.mdc.sendOne('192.168.0.10', 0x01, []); // Promise<IMDCResponse>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
21
|
## Methods
|
|
31
22
|
|
|
32
23
|
### sendOne()
|
|
@@ -16,20 +16,6 @@ Emulator has certain limitations while handling offline files. [Read more here](
|
|
|
16
16
|
|
|
17
17
|
:::
|
|
18
18
|
|
|
19
|
-
```ts
|
|
20
|
-
await sos.offline.addFile([{
|
|
21
|
-
uri: 'https://unpkg.com/normalize.css@8.0.1/normalize.css',
|
|
22
|
-
uid: 'normalize.css',
|
|
23
|
-
type: sos.offline.types.css,
|
|
24
|
-
flags: [sos.offline.flags.append(document.head)],
|
|
25
|
-
}, {
|
|
26
|
-
uri: 'https://code.jquery.com/jquery-3.7.1.slim.min.js',
|
|
27
|
-
uid: 'jquery-3.7.1.slim.min.js',
|
|
28
|
-
type: sos.offline.types.javascript,
|
|
29
|
-
flags: [sos.offline.flags.append(document.body)],
|
|
30
|
-
}]);
|
|
31
|
-
```
|
|
32
|
-
|
|
33
19
|
## Methods
|
|
34
20
|
|
|
35
21
|
### addFile()
|
package/docs/sos/osd.md
CHANGED
|
@@ -14,4 +14,19 @@ The `showOSD()` method opens the OSD without typing the pin.
|
|
|
14
14
|
|
|
15
15
|
```ts expandable
|
|
16
16
|
showOSD(): Promise<void>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## API Example
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { sos } from '@signageos/front-applet';
|
|
23
|
+
|
|
24
|
+
void sos.onReady(() => {
|
|
25
|
+
sos.input.onKeyUp(async (e) => {
|
|
26
|
+
if (e.keyName === 'BLUE') {
|
|
27
|
+
await sos.osd.showOSD();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
17
32
|
```
|
package/docs/sos/proofOfPlay.md
CHANGED
|
@@ -4,18 +4,6 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# proofOfPlay
|
|
6
6
|
|
|
7
|
-
```ts
|
|
8
|
-
await sos.proofOfPlay.recordItemPlayed({
|
|
9
|
-
name: 'generic-brand-christmas-coffee-ad',
|
|
10
|
-
customId: 'dBE43bFB3312VFfvd34bgGHJVV334cd2',
|
|
11
|
-
type: 'video',
|
|
12
|
-
tags: ['generic-brand', 'christmas'],
|
|
13
|
-
fileName: 'coffee.mp4',
|
|
14
|
-
playbackSuccess: false,
|
|
15
|
-
errorMessage: 'Unsupported framerate 60fps',
|
|
16
|
-
});
|
|
17
|
-
```
|
|
18
|
-
|
|
19
7
|
## Methods
|
|
20
8
|
|
|
21
9
|
### recordItemPlayed()
|
|
@@ -38,16 +26,21 @@ interface IRecordItemOptions {
|
|
|
38
26
|
|
|
39
27
|
```
|
|
40
28
|
|
|
41
|
-
|
|
29
|
+
## API Example
|
|
42
30
|
|
|
43
31
|
```ts
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
import { sos } from '@signageos/front-applet';
|
|
33
|
+
|
|
34
|
+
void sos.onReady(async () => {
|
|
35
|
+
await sos.proofOfPlay.recordItemPlayed({
|
|
36
|
+
name: 'generic-brand-christmas-coffee-ad',
|
|
37
|
+
customId: 'dBE43bFB3312VFfvd34bgGHJVV334cd2',
|
|
38
|
+
type: 'video',
|
|
39
|
+
tags: ['generic-brand', 'christmas'],
|
|
40
|
+
fileName: 'coffee.mp4',
|
|
41
|
+
playbackSuccess: false,
|
|
42
|
+
errorMessage: 'Unsupported framerate 60fps',
|
|
43
|
+
});
|
|
52
44
|
});
|
|
45
|
+
|
|
53
46
|
```
|
package/docs/sos/sync.md
CHANGED
|
@@ -7,20 +7,6 @@ sidebar_position: 0
|
|
|
7
7
|
The `sos.sync` API groups together methods for synchronization of multiple devices. Devices are synchronized either through an external
|
|
8
8
|
server or one of the devices becomes a master device.
|
|
9
9
|
|
|
10
|
-
```ts
|
|
11
|
-
// use default engine
|
|
12
|
-
await sos.sync.connect();
|
|
13
|
-
|
|
14
|
-
// use sync-server engine and default server
|
|
15
|
-
await sos.sync.connect({ engine: 'sync-server' });
|
|
16
|
-
|
|
17
|
-
// use sync-server engine and custom server
|
|
18
|
-
await sos.sync.connect({ engine: 'sync-server', uri: syncServerUri });
|
|
19
|
-
|
|
20
|
-
// use p2p-local engine
|
|
21
|
-
await sos.sync.connect({ engine: 'p2p-local' });
|
|
22
|
-
```
|
|
23
|
-
|
|
24
10
|
## Methods
|
|
25
11
|
|
|
26
12
|
### broadcastValue()
|
|
@@ -277,7 +263,7 @@ wait(data?: any, groupName?: string, timeout?: number): Promise<any>;
|
|
|
277
263
|
|
|
278
264
|
### ~connect(options)~
|
|
279
265
|
|
|
280
|
-
:::danger
|
|
266
|
+
:::danger Deprecated
|
|
281
267
|
|
|
282
268
|
This method was deprecated. Use `connect({ engine: 'sync-server' })` instead.
|
|
283
269
|
|
|
@@ -291,7 +277,7 @@ connect(options?: string): Promise<void>;
|
|
|
291
277
|
|
|
292
278
|
### ~init()~
|
|
293
279
|
|
|
294
|
-
:::danger
|
|
280
|
+
:::danger Deprecated
|
|
295
281
|
|
|
296
282
|
This method was deprecated. use `sos.sync.joinGroup()` instead.
|
|
297
283
|
|
|
@@ -305,7 +291,7 @@ init(groupName?: string, deviceIdentification?: string): Promise<void>;
|
|
|
305
291
|
|
|
306
292
|
### ~setValue()~
|
|
307
293
|
|
|
308
|
-
:::danger
|
|
294
|
+
:::danger Deprecated
|
|
309
295
|
|
|
310
296
|
This method was deprecated. use `sos.sync.broadcastValue()` instead.
|
|
311
297
|
|
|
@@ -30,4 +30,17 @@ setVolume(volume: number): Promise<void>;
|
|
|
30
30
|
|
|
31
31
|
| Name | Type | Description |
|
|
32
32
|
|----------|----------|--------------------------|
|
|
33
|
-
| `volume` | `number` | Value between 0 and 100. |
|
|
33
|
+
| `volume` | `number` | Value between 0 and 100. |
|
|
34
|
+
|
|
35
|
+
## API Example
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { sos } from '@signageos/front-applet';
|
|
39
|
+
|
|
40
|
+
void sos.onReady(async () => {
|
|
41
|
+
await sos.management.audio.getVolume(); // Returns number e.g. 39
|
|
42
|
+
|
|
43
|
+
await sos.management.audio.setVolume(90);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
```
|
|
@@ -18,6 +18,13 @@ This information, when combined with firmware version, can be used to identify a
|
|
|
18
18
|
getType(): Promise<string>;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
#### Example
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
const type = await sos.management.firmware.getType();
|
|
25
|
+
console.log(type); // e.g. rpi4
|
|
26
|
+
```
|
|
27
|
+
|
|
21
28
|
<Separator />
|
|
22
29
|
|
|
23
30
|
### getVersion()
|
|
@@ -28,6 +35,13 @@ The `getVersion()` method returns the version of the firmware currently installe
|
|
|
28
35
|
getVersion(): Promise<string>;
|
|
29
36
|
```
|
|
30
37
|
|
|
38
|
+
#### Example
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
const version = await sos.management.firmware.getVersion();
|
|
42
|
+
console.log(version); // Returns String e.g. T-HKMLAKUC-2020.5
|
|
43
|
+
```
|
|
44
|
+
|
|
31
45
|
<Separator />
|
|
32
46
|
|
|
33
47
|
### upgrade(baseUrl, version)
|
|
@@ -45,6 +59,12 @@ upgrade(baseUrl: string, version: string): Promise<void>;
|
|
|
45
59
|
| `baseUrl` | `string` | The server URL where firmware files are located. |
|
|
46
60
|
| `version` | `string` | The version of the firmware being installed. |
|
|
47
61
|
|
|
62
|
+
#### Example
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
await sos.management.firmware.upgrade('https://cdn.your-cms.com/tizen/pmf/fw/2080_4.bem', 'T-HKMLAKUC-2080.4');
|
|
66
|
+
```
|
|
67
|
+
|
|
48
68
|
<Separator />
|
|
49
69
|
|
|
50
70
|
### upgrade(fwUri)
|
|
@@ -70,6 +90,12 @@ upgrade(fwUri: string): Promise<void>;
|
|
|
70
90
|
|---------|----------|--------------------------------------------------|
|
|
71
91
|
| `fwUri` | `string` | FQN uri where the firmware main file is located. |
|
|
72
92
|
|
|
93
|
+
#### Example
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
await sos.management.firmware.upgrade('https://cdn.your-cms.com/tizen/pmf/fw/2080_4.bem');
|
|
97
|
+
```
|
|
98
|
+
|
|
73
99
|
<Separator />
|
|
74
100
|
|
|
75
101
|
### upgrade(version, baseUrl)
|
|
@@ -124,7 +124,7 @@ interface INetworkOptions {
|
|
|
124
124
|
|
|
125
125
|
### ~getActiveInfo()~
|
|
126
126
|
|
|
127
|
-
:::danger
|
|
127
|
+
:::danger Deprecated
|
|
128
128
|
|
|
129
129
|
This method was deprecated. Use `sos.management.network.listInterfaces()` instead.
|
|
130
130
|
|
|
@@ -162,7 +162,7 @@ type NetworkInterface = 'wifi' | 'ethernet';
|
|
|
162
162
|
|
|
163
163
|
### ~setDHCP(networkInterface)~
|
|
164
164
|
|
|
165
|
-
:::danger
|
|
165
|
+
:::danger Deprecated
|
|
166
166
|
|
|
167
167
|
This method was deprecated. Use `sos.management.network.setDHCP(interfaceName)` instead.
|
|
168
168
|
|
|
@@ -179,7 +179,7 @@ type NetworkInterface = 'wifi' | 'ethernet';
|
|
|
179
179
|
|
|
180
180
|
### ~setManual(options)~
|
|
181
181
|
|
|
182
|
-
:::danger
|
|
182
|
+
:::danger Deprecated
|
|
183
183
|
|
|
184
184
|
This method was deprecated. Use `sos.management.network.setManual(interfaceName, options)` instead.
|
|
185
185
|
|