@signageos/front-applet 5.5.0 → 5.7.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.
- package/CHANGELOG.md +11 -0
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/js-api/js-api-introduction.md +6 -0
- package/docs/js-api/js-display.md +1 -1
- package/docs/js-api/js-file-system.md +4 -0
- package/docs/js-api/js-hardware-serial.md +23 -14
- package/docs/js-api/js-iframes.md +2 -0
- package/docs/js-api/js-proof-of-play.md +62 -0
- package/docs/management-api/1-js-management.md +8 -0
- package/docs/management-api/5-js-management-screen.md +16 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +9 -9
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js +2 -1
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
- package/es6/FrontApplet/Error/SosError.js +1 -1
- package/es6/FrontApplet/Exchange/Exchange.js +1 -1
- package/es6/FrontApplet/Font/fontFaceGenerator.js +1 -1
- package/es6/FrontApplet/FrontApplet.d.ts +2 -0
- package/es6/FrontApplet/FrontApplet.js +3 -1
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +1 -1
- package/es6/FrontApplet/Input/Input.d.ts +1 -1
- package/es6/FrontApplet/Management/App.js +2 -2
- package/es6/FrontApplet/Management/Audio.js +2 -2
- package/es6/FrontApplet/Management/Debug.js +2 -2
- package/es6/FrontApplet/Management/Firmware.js +1 -1
- package/es6/FrontApplet/Management/Management.d.ts +1 -0
- package/es6/FrontApplet/Management/Management.js +12 -4
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Network.js +1 -1
- package/es6/FrontApplet/Management/OS.js +3 -3
- package/es6/FrontApplet/Management/Package.js +1 -1
- package/es6/FrontApplet/Management/PeerRecovery.d.ts +1 -1
- package/es6/FrontApplet/Management/PeerRecovery.js +2 -2
- package/es6/FrontApplet/Management/Power.js +3 -3
- package/es6/FrontApplet/Management/Proxy.js +3 -3
- package/es6/FrontApplet/Management/RemoteControl.js +2 -2
- package/es6/FrontApplet/Management/Screen.js +7 -7
- package/es6/FrontApplet/Management/Time.js +1 -1
- package/es6/FrontApplet/Offline/Cache/Cache.js +2 -2
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +1 -1
- package/es6/FrontApplet/Offline/IElement.js +1 -1
- package/es6/FrontApplet/Offline/ISaveFile.js +4 -4
- package/es6/FrontApplet/Offline/Types.js +1 -1
- package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.d.ts +10 -0
- package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.js +3 -0
- package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.js.map +1 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +7 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +41 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlayType.d.ts +4 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlayType.js +8 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlayType.js.map +1 -0
- package/es6/FrontApplet/Stream/Stream.js +1 -1
- package/es6/FrontApplet/Video/Video.js +5 -5
- package/es6/Monitoring/Montoring.js +5 -5
- package/package.json +4 -4
|
@@ -71,6 +71,12 @@ For **Device Management** we strongly recommend using REST APIs. [See the REST A
|
|
|
71
71
|
| [Wi-Fi](/api/js/management/latest/13-js-management-wifi) | Manage Wi-Fi |
|
|
72
72
|
:::
|
|
73
73
|
|
|
74
|
+
# Testing Framework SDK
|
|
75
|
+
|
|
76
|
+
Write and then run **automated tests** for your applet on physical devices, streamlining your development and QA efforts.
|
|
77
|
+
|
|
78
|
+
See full [documentation on GitHub](https://github.com/signageos/test-framework)
|
|
79
|
+
|
|
74
80
|
# Node.JS SDK
|
|
75
81
|
|
|
76
82
|
Library which allows you to fully manage signageOS applets, devices, management & monitoring using Node.JS and REST API.
|
|
@@ -33,7 +33,7 @@ with a warning message like this one:
|
|
|
33
33
|
|
|
34
34
|
::: alert alert--warning
|
|
35
35
|
* Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
|
|
36
|
-
* More info [**HERE**](/api/js/content/js-display#supports).
|
|
36
|
+
* More info [**HERE**](/api/js/content/latest/js-display#supports).
|
|
37
37
|
:::
|
|
38
38
|
|
|
39
39
|
::: table-responsive
|
|
@@ -292,6 +292,10 @@ Download file to path within existing directory or **overrides existing file** i
|
|
|
292
292
|
| `uri` | String | <div class="red">Yes</div> | Url address to retrieve the file from network |
|
|
293
293
|
| `headers` | Object | <div class="yellow">No</div> | Key, value pairs of HTTP headers to send along with the request. Used when the target file is protected by a password or if any
|
|
294
294
|
|
|
295
|
+
::: alert alert--danger
|
|
296
|
+
For every download request, our app makes HEAD request for `content-length` header on that downloaded file.
|
|
297
|
+
:::
|
|
298
|
+
|
|
295
299
|
::: alert alert--warning
|
|
296
300
|
`headers` has to be a JSON object. If you are passing the value, make sure you use `JSON.parse()`.
|
|
297
301
|
:::
|
|
@@ -21,7 +21,8 @@ Such hardware could be, for example, printers, payment terminals or sensors.
|
|
|
21
21
|
|
|
22
22
|
::: alert alert--warning
|
|
23
23
|
* Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
|
|
24
|
-
* More info [**HERE**](/api/js/content/js-display#supports).
|
|
24
|
+
* More info [**HERE**](/api/js/content/latest/js-display#supports).
|
|
25
|
+
* Samsung Kiosk serial connection only works over serial ports, not over USB ports
|
|
25
26
|
:::
|
|
26
27
|
|
|
27
28
|
## All methods
|
|
@@ -48,7 +49,7 @@ Here is the options object defined as Typescript interface:
|
|
|
48
49
|
|
|
49
50
|
```typescript
|
|
50
51
|
interface ISerialPortOptions {
|
|
51
|
-
device
|
|
52
|
+
device?: string;
|
|
52
53
|
baudRate: number;
|
|
53
54
|
parity?: 'none' | 'even' | 'mark' | 'odd' | 'space';
|
|
54
55
|
databits?: number;
|
|
@@ -58,6 +59,12 @@ interface ISerialPortOptions {
|
|
|
58
59
|
|
|
59
60
|
### Javascript example
|
|
60
61
|
```javascript
|
|
62
|
+
// Open default serial port based platform
|
|
63
|
+
const serialPort = await sos.hardware.openSerialPort({
|
|
64
|
+
baudRate: 115200,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Open specific serial port
|
|
61
68
|
const serialPort = await sos.hardware.openSerialPort({
|
|
62
69
|
device: '/dev/ttyUSB0',
|
|
63
70
|
baudRate: 115200,
|
|
@@ -67,13 +74,13 @@ const serialPort = await sos.hardware.openSerialPort({
|
|
|
67
74
|
::: alert alert--info
|
|
68
75
|
Device address is different per platform (at least for now). Kindly find the respective device address:
|
|
69
76
|
|
|
70
|
-
| Device type |
|
|
71
|
-
| ----------- | ----------------- |
|
|
72
|
-
| RaspberryPi / Linux | `/dev/ttyUSB0` |
|
|
73
|
-
| Windows | `COM3` (typically, but check your Win machine if this does not work) |
|
|
74
|
-
| Samsung Kiosk | `PORT1`, `PORT2`, `PORT3` |
|
|
75
|
-
| Android | `/dev/ttyusb0` |
|
|
76
|
-
| BrightSign |
|
|
77
|
+
| Device type | Default value | Other values for `device` |
|
|
78
|
+
| ----------- | ---------- | ----------------- |
|
|
79
|
+
| RaspberryPi / Linux | `/dev/ttyUSB0` | `/dev/ttyUSB0` |
|
|
80
|
+
| Windows | `COM3` | `COM3` (typically, but check your Win machine if this does not work) |
|
|
81
|
+
| Samsung Kiosk | `PORT1` |`PORT1`, `PORT2`, `PORT3` |
|
|
82
|
+
| Android | `/dev/ttyusb0` | `/dev/ttyusb0` |
|
|
83
|
+
| BrightSign | `0` | `0`, `1`, `USB:A/0` |
|
|
77
84
|
:::
|
|
78
85
|
|
|
79
86
|
## Serial port methods
|
|
@@ -84,14 +91,15 @@ you can call following methods on it.
|
|
|
84
91
|
::: table-responsive
|
|
85
92
|
| Method | Description | Supported since |
|
|
86
93
|
| ---------- | ----------------------------------------------------------- | :-------------: |
|
|
87
|
-
| `onData()` | Call a listener callback anytime serial port
|
|
94
|
+
| `onData()` | Call a listener callback anytime the opened serial port receiving data. | 4.4.0 |
|
|
88
95
|
| `write()` | Write data to the serial port | 4.4.0 |
|
|
89
96
|
| `close()` | Close serial port | 4.4.0 |
|
|
90
97
|
:::
|
|
91
98
|
|
|
92
99
|
## onData()
|
|
93
100
|
|
|
94
|
-
Call a listener callback anytime serial port
|
|
101
|
+
Call a listener callback anytime the opened serial port receiving data.
|
|
102
|
+
The listener will stop if the serial port is closed.
|
|
95
103
|
|
|
96
104
|
Since data may be either text or binary, it's emitted as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)
|
|
97
105
|
and should be processed further according to the requirements of your application.
|
|
@@ -115,12 +123,12 @@ serialPort.onData((data) => {
|
|
|
115
123
|
|
|
116
124
|
## write()
|
|
117
125
|
|
|
118
|
-
Write data to the serial port. The data can be a string, array of numbers or [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
|
|
126
|
+
Write data to the serial port. The data can be a string of hexadecimal digits, array of numbers or [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array). And converted to hexadecimals
|
|
119
127
|
|
|
120
128
|
### Javascript example
|
|
121
129
|
```javascript
|
|
122
130
|
// serial port instance previously created via sos.hardware.openSerialPort()
|
|
123
|
-
await serialPort.write('
|
|
131
|
+
await serialPort.write('68656c6c6f'); // hexadecimal string
|
|
124
132
|
await serialPort.write([ 10, 20, 30, 40 ]); // array of numbers
|
|
125
133
|
await serialPort.write(Uint8Array.from([ 10, 20, 30, 40 ])); // Uint8Array
|
|
126
134
|
```
|
|
@@ -137,7 +145,8 @@ await serialPort.close();
|
|
|
137
145
|
|
|
138
146
|
## Errors
|
|
139
147
|
|
|
140
|
-
Following errors may occur when working with the serial ports.
|
|
148
|
+
Following errors may occur when working with the serial ports. However they don't reflect on actual physical connectivity of the ports due to Samsung b2bapi does not register these events.
|
|
149
|
+
|
|
141
150
|
|
|
142
151
|
::: table-responsive
|
|
143
152
|
| Code | Type | Message |
|
|
@@ -17,6 +17,8 @@ We **do not recommend** to use iframes inside your Applet. However, if you have
|
|
|
17
17
|
|
|
18
18
|
::: alert alert--warning
|
|
19
19
|
The signageOS Snippet and API works **ONLY** if the iframe is served from the display's internal storage - `<iframe src="file://...`. If your iframe is served from a live URL - `<iframe src="https://your-iframe-url"...` the snippet and signageOS API will **NOT** work. This is a security limitation to prevent random site took advantage of the API and alter the display behavior. There is a simple way to [save and load your iframe from the internal storage](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/iframes). Just make sure you are using full paths in your iframe for linking javascripts and css instead of the relative ones.
|
|
20
|
+
|
|
21
|
+
If your device can not load a file stored in local storage, such as an html, you can try to use an alternative instead of python to zip the file when you are preparing the applet.
|
|
20
22
|
:::
|
|
21
23
|
|
|
22
24
|
## Create applet
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Proof of Play
|
|
3
|
+
author: Robert Pecha
|
|
4
|
+
date: 31.01.2023
|
|
5
|
+
type: js-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- js_api
|
|
11
|
+
description: "[Content JS API] You can use our Prooof of Play mechanism to log that some content was played on end device successfully or not. Our system includes important metadata about applet and device out-of-box to simplify solution of issues with content. You can use SignageOS to analyze, if, where, when and how long proposed content was playing in front of audience."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# All methods
|
|
15
|
+
::: table-responsive
|
|
16
|
+
| Methods | Description | Supported since |
|
|
17
|
+
| ----------- | ------------ | -----------|
|
|
18
|
+
| `recordItemPlayed()` | Log that content was played successfully | 5.5.1 |
|
|
19
|
+
:::
|
|
20
|
+
|
|
21
|
+
## recordItemPlayed()
|
|
22
|
+
|
|
23
|
+
Send provided information about played content along with additional metadata about current applet and device to SignageOS.
|
|
24
|
+
|
|
25
|
+
### Parameters
|
|
26
|
+
|
|
27
|
+
::: table-responsive
|
|
28
|
+
| Param | Type | Required | Description |
|
|
29
|
+
| --------- | ------ | :------------------------: | -------------------------------------------------- |
|
|
30
|
+
| `options` | Object | <div class="red">Yes</div> | Object containing information about played content |
|
|
31
|
+
:::
|
|
32
|
+
|
|
33
|
+
### Options
|
|
34
|
+
|
|
35
|
+
Here is the options object defined as Typescript interface:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
interface IRecordItemOptions {
|
|
39
|
+
name: string;
|
|
40
|
+
customId?: string;
|
|
41
|
+
type?: 'video' | 'image' | 'html' | 'custom';
|
|
42
|
+
tags?: string[];
|
|
43
|
+
fileName?: string;
|
|
44
|
+
playbackSuccess?: boolean;
|
|
45
|
+
errorMessage?: string;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Javascript example
|
|
50
|
+
```javascript
|
|
51
|
+
|
|
52
|
+
await sos.proofOfPlay.recordItemPlayed({
|
|
53
|
+
name: 'tesla-commercial-ad-christmas-campaign',
|
|
54
|
+
customId: 'dBE43bFB3312VFfvd34bgGHJVV334cd2',
|
|
55
|
+
type: 'video',
|
|
56
|
+
tags: ['tesla', 'christmas'],
|
|
57
|
+
fileName: 'tesla.mp4',
|
|
58
|
+
playbackSuccess: false,
|
|
59
|
+
errorMessage: 'Unsupported framerate 60fps',
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
```
|
|
@@ -27,6 +27,7 @@ To make the management of devices more viable and open there is a management API
|
|
|
27
27
|
| `getTemperature()` | Current device temperature | 3.0.0 |
|
|
28
28
|
| `resetSettings()` | Clear all settings on device | 4.0.0 |
|
|
29
29
|
| `factoryReset()` | Do a device factory reset | 4.0.0 |
|
|
30
|
+
| `getBrand()` | Information about device brand | 5.7.0 |
|
|
30
31
|
:::
|
|
31
32
|
|
|
32
33
|
## Examples
|
|
@@ -131,3 +132,10 @@ Method `getTemperature()` will display information about the current temperature
|
|
|
131
132
|
```typescript
|
|
132
133
|
await sos.management.getTemperature(); // Returns number values 0-100
|
|
133
134
|
```
|
|
135
|
+
|
|
136
|
+
## getBrand()
|
|
137
|
+
Method `getBrand()` will display the manufacturer brand of your device.
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
await sos.management.getBrand(); // Returns string ex. Google, Samsung, signageOS for emulators
|
|
141
|
+
```
|
|
@@ -19,6 +19,16 @@ This method turns on/off only display/backlight. It will **not** set any power-s
|
|
|
19
19
|
reboot any device once a day.
|
|
20
20
|
:::
|
|
21
21
|
|
|
22
|
+
::: alert alert--info
|
|
23
|
+
There is a specific behavior based on the device type you operate:
|
|
24
|
+
**On SoC displays** (e.g. Samsung Tizen, LG webOS, Android-based SoC displays from Sony, Vestel Philips,...)
|
|
25
|
+
- `powerOn()` and `powerOff()` are turning the display backlight and the panel off
|
|
26
|
+
|
|
27
|
+
**On external media players** (e.g. BrightSign, Windows PC, Android players, Raspberry Pi)
|
|
28
|
+
- `powerOn()` and `powerOff()` are turning off the video output (typically HDMI-out); the connected display backlight is not managed by this functionality and needs to be controlled via RS232 or another way.
|
|
29
|
+
:::
|
|
30
|
+
|
|
31
|
+
|
|
22
32
|
## All methods
|
|
23
33
|
|
|
24
34
|
::: table-responsive
|
|
@@ -186,6 +196,12 @@ await sos.management.screen.powerOn(); // Returns void
|
|
|
186
196
|
## powerOff()
|
|
187
197
|
Method `powerOff()` turns off the targeted display.
|
|
188
198
|
|
|
199
|
+
::: alert alert--warning
|
|
200
|
+
On Android devices, `powerOff()` also shuts down the webview and the Applet. It's default Android behavior that cannot be changed. Once the Applet is off, you cannot call `powerOn()` to resume the playback.
|
|
201
|
+
|
|
202
|
+
To manage the display On/Off state, use [REST API Power Actions](https://api.docs.signageos.io/#138035f6-af92-4345-8eaa-9c7f1ed0efd3) instead.
|
|
203
|
+
:::
|
|
204
|
+
|
|
189
205
|
```javascript
|
|
190
206
|
await sos.management.screen.powerOff(); // Returns void
|
|
191
207
|
```
|
|
@@ -5,39 +5,39 @@ exports.VITheme = {
|
|
|
5
5
|
base: { '?string': ['light', 'dark'] },
|
|
6
6
|
shape: { '?object': {
|
|
7
7
|
cornerSize: '?number',
|
|
8
|
-
}
|
|
8
|
+
},
|
|
9
9
|
},
|
|
10
10
|
colors: { '?object': {
|
|
11
11
|
primary: '?string',
|
|
12
12
|
background: '?string',
|
|
13
13
|
control: '?string',
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
15
|
},
|
|
16
16
|
widgets: { '?object': {
|
|
17
17
|
editAddress: { '?object': {
|
|
18
18
|
colors: { '?object': {
|
|
19
19
|
background: '?string',
|
|
20
20
|
text: '?string',
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
22
|
},
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
24
|
},
|
|
25
25
|
buttonClose: { '?object': {
|
|
26
26
|
colors: { '?object': {
|
|
27
27
|
background: '?string',
|
|
28
28
|
text: '?string',
|
|
29
29
|
icon: '?string',
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
31
|
},
|
|
32
32
|
icon: { '?string': ['none', 'exit_to_app', 'close', 'cancel'] },
|
|
33
33
|
text: '?string',
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
35
|
},
|
|
36
36
|
progress: { '?object': {
|
|
37
37
|
color: '?string',
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
39
|
},
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
exports.VIOpenLinkOptions = {
|
|
@@ -50,7 +50,7 @@ exports.VIOpenLinkOptions = {
|
|
|
50
50
|
y: 'number',
|
|
51
51
|
width: 'number',
|
|
52
52
|
height: 'number',
|
|
53
|
-
}
|
|
53
|
+
},
|
|
54
54
|
},
|
|
55
55
|
theme: { '?object': exports.VITheme },
|
|
56
56
|
headlessMode: '?boolean',
|
|
@@ -59,7 +59,8 @@ function warnOrErrorWrongCoordination(coordName, castedValue, value) {
|
|
|
59
59
|
throw Error(`Coordination ${coordName}="${value}" is not valid number`);
|
|
60
60
|
}
|
|
61
61
|
else if (typeof castedValue !== typeof value) {
|
|
62
|
-
console.warn(`Coordination ${coordName}="${value}" is not a typeof number but is typeof ${typeof value}.
|
|
62
|
+
console.warn(`Coordination ${coordName}="${value}" is not a typeof number but is typeof ${typeof value}. `
|
|
63
|
+
+ `Was automatically casted as "${castedValue}"`);
|
|
63
64
|
}
|
|
64
65
|
else if (castedValue !== value) {
|
|
65
66
|
console.warn(`Coordination ${coordName}="${value}" is not an integer but is float. Was automatically floored to "${castedValue}"`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinationsHelper.js","sourceRoot":"","sources":["../../../src/FrontApplet/Dimensions/coordinationsHelper.ts"],"names":[],"mappings":";;;AAQA,SAAgB,qBAAqB,CAAC,KAA0B;IAC/D,IAAI,CAAS,CAAC;IACd,IAAI,CAAS,CAAC;IACd,IAAI,KAAa,CAAC;IAClB,IAAI,MAAc,CAAC;IAEnB,IAAI,KAAK,CAAC,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE;QAC9C,CAAC,GAAG,CAAC,CAAC;KACN;SAAM,IAAI,OAAO,KAAK,CAAC,CAAC,KAAK,QAAQ,EAAE;QACvC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAQ,CAAC,CAAC;KAC7B;SAAM;QACN,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACxB;IACD,4BAA4B,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAE9C,IAAI,KAAK,CAAC,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE;QAC9C,CAAC,GAAG,CAAC,CAAC;KACN;SAAM,IAAI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A0C,OAAO,KAAK,IAAI;cAC3F,gCAAgC,WAAW,GAAG,CAChD,CAAC;KACF;SAAM,IAAI,WAAW,KAAK,KAAK,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,gBAAgB,SAAS,KAAK,KAAK,mEAAmE,WAAW,GAAG,CAAC,CAAC;KACnI;AACF,CAAC"}
|
|
@@ -22,7 +22,7 @@ function createExchange(messagePrefix, postMessage) {
|
|
|
22
22
|
return {
|
|
23
23
|
messageNameToType,
|
|
24
24
|
postMessage: typedPostMessage,
|
|
25
|
-
createNamespaced: (namespace) => createExchange(messageNameToType(namespace), postMessage)
|
|
25
|
+
createNamespaced: (namespace) => createExchange(messageNameToType(namespace), postMessage),
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
exports.createExchange = createExchange;
|
|
@@ -18,6 +18,7 @@ import Management from './Management/Management';
|
|
|
18
18
|
import Monitors from './Monitors/Monitors';
|
|
19
19
|
import Sensors from './Sensors/Sensors';
|
|
20
20
|
import OSD from './OSD/OSD';
|
|
21
|
+
import ProofOfPlay from './ProofOfPlay/ProofOfPlay';
|
|
21
22
|
export default class FrontApplet {
|
|
22
23
|
readonly window: Window & WeinreData;
|
|
23
24
|
private messagePrefix;
|
|
@@ -43,6 +44,7 @@ export default class FrontApplet {
|
|
|
43
44
|
readonly management: Management;
|
|
44
45
|
readonly monitors: Monitors;
|
|
45
46
|
readonly osd: OSD;
|
|
47
|
+
readonly proofOfPlay: ProofOfPlay;
|
|
46
48
|
readonly sensors: Sensors;
|
|
47
49
|
private readyEmitter;
|
|
48
50
|
private invocationResponseEmitter;
|
|
@@ -24,6 +24,7 @@ const Monitors_1 = require("./Monitors/Monitors");
|
|
|
24
24
|
const Sensors_1 = require("./Sensors/Sensors");
|
|
25
25
|
const Exchange_1 = require("./Exchange/Exchange");
|
|
26
26
|
const OSD_1 = require("./OSD/OSD");
|
|
27
|
+
const ProofOfPlay_1 = require("./ProofOfPlay/ProofOfPlay");
|
|
27
28
|
class FrontApplet {
|
|
28
29
|
constructor(window, messagePrefix) {
|
|
29
30
|
this.window = window;
|
|
@@ -49,12 +50,13 @@ class FrontApplet {
|
|
|
49
50
|
this.management = new Management_1.default(messagePrefix, this.postMessage.bind(this));
|
|
50
51
|
this.monitors = new Monitors_1.default(messagePrefix, this.postMessage.bind(this));
|
|
51
52
|
this.osd = new OSD_1.default(messagePrefix, this.postMessage.bind(this));
|
|
53
|
+
this.proofOfPlay = new ProofOfPlay_1.default(this.command);
|
|
52
54
|
this.sensors = new Sensors_1.default(messagePrefix);
|
|
53
55
|
this.javascriptLoadFileController = new JavascriptLoadFileController_1.default(this.window);
|
|
54
56
|
this.window.addEventListener('message', (event) => this.handleMessage(event));
|
|
55
57
|
this.window.addEventListener('keyup', (event) => this.input.handleKeyEvent(event));
|
|
56
58
|
this.postMessage({
|
|
57
|
-
type: messagePrefix + '_api.ready'
|
|
59
|
+
type: messagePrefix + '_api.ready',
|
|
58
60
|
});
|
|
59
61
|
this.startPinging();
|
|
60
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontApplet.js","sourceRoot":"","sources":["../../src/FrontApplet/FrontApplet.ts"],"names":[],"mappings":";;AACA,mCAAsC;AACtC,gDAAsD;AAEtD,yCAAkC;AAClC,4CAAqC;AACrC,+CAAwC;AAExC,kGAA2F;AAC3F,+CAAwC;AACxC,kDAA2C;AAC3C,+CAAwC;AACxC,4CAAqC;AACrC,yCAAkC;AAClC,yCAAkC;AAClC,yCAAkD;AAClD,wDAAiD;AACjD,+CAAwC;AACxC,4CAAqC;AACrC,sCAA+B;AAC/B,wDAAiD;AACjD,qDAA2E;AAC3E,wDAAiD;AACjD,kDAA2C;AAC3C,+CAAwC;AACxC,kDAAqD;AACrD,mCAA4B;
|
|
1
|
+
{"version":3,"file":"FrontApplet.js","sourceRoot":"","sources":["../../src/FrontApplet/FrontApplet.ts"],"names":[],"mappings":";;AACA,mCAAsC;AACtC,gDAAsD;AAEtD,yCAAkC;AA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,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;IAEO,YAAY;QACnB,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACzE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACtC,MAAM,EAAE,CAAC;IACV,CAAC;CACD;AAxND,8BAwNC;AAED,SAAS,QAAQ,CAAC,MAAiC;IAClD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import IKeyUpEventListener from './IKeyUpEventListener';
|
|
4
4
|
import IInputKeyMessage from './IInputKeyMessage';
|
|
5
|
-
import IPostMessage from '
|
|
5
|
+
import IPostMessage from '../IPostMessage';
|
|
6
6
|
export default class Input extends EventEmitter implements IInputEventEmitter {
|
|
7
7
|
readonly window: Window;
|
|
8
8
|
private messagePrefix;
|
|
@@ -18,7 +18,7 @@ class App {
|
|
|
18
18
|
getType() {
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
const { applicationType } = yield this.postMessage({
|
|
21
|
-
type: this.getMessage('get_application_type')
|
|
21
|
+
type: this.getMessage('get_application_type'),
|
|
22
22
|
});
|
|
23
23
|
return applicationType;
|
|
24
24
|
});
|
|
@@ -26,7 +26,7 @@ class App {
|
|
|
26
26
|
getVersion() {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
const { applicationVersion } = yield this.postMessage({
|
|
29
|
-
type: this.getMessage('get_application_version')
|
|
29
|
+
type: this.getMessage('get_application_version'),
|
|
30
30
|
});
|
|
31
31
|
return applicationVersion;
|
|
32
32
|
});
|
|
@@ -18,7 +18,7 @@ class Audio {
|
|
|
18
18
|
getVolume() {
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
const { volume } = yield this.postMessage({
|
|
21
|
-
type: this.getMessage('get_volume')
|
|
21
|
+
type: this.getMessage('get_volume'),
|
|
22
22
|
});
|
|
23
23
|
return volume;
|
|
24
24
|
});
|
|
@@ -28,7 +28,7 @@ class Audio {
|
|
|
28
28
|
Validate_1.default({ volume }).required().number().min(0).max(100);
|
|
29
29
|
yield this.postMessage({
|
|
30
30
|
type: this.getMessage('set_volume'),
|
|
31
|
-
volume
|
|
31
|
+
volume,
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -28,7 +28,7 @@ class Debug {
|
|
|
28
28
|
isEnabled() {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
const { isEnabled } = yield this.postMessage({
|
|
31
|
-
type: this.getMessage('is_enabled')
|
|
31
|
+
type: this.getMessage('is_enabled'),
|
|
32
32
|
});
|
|
33
33
|
return isEnabled;
|
|
34
34
|
});
|
|
@@ -38,7 +38,7 @@ class Debug {
|
|
|
38
38
|
Validate_1.default({ enabled }).required().boolean();
|
|
39
39
|
yield this.postMessage({
|
|
40
40
|
type: this.getMessage('set_debug'),
|
|
41
|
-
enabled
|
|
41
|
+
enabled,
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -29,7 +29,7 @@ class Firmware {
|
|
|
29
29
|
getVersion() {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
const { firmwareVersion } = yield this.postMessage({
|
|
32
|
-
type: this.getMessage('get_firmware_version')
|
|
32
|
+
type: this.getMessage('get_firmware_version'),
|
|
33
33
|
});
|
|
34
34
|
return firmwareVersion;
|
|
35
35
|
});
|
|
@@ -45,6 +45,7 @@ export default class Management {
|
|
|
45
45
|
getNetworkInfo(): Promise<INetworkInfo>;
|
|
46
46
|
getBatteryStatus(): Promise<IBatteryStatus>;
|
|
47
47
|
getTemperature(): Promise<number>;
|
|
48
|
+
getBrand(): Promise<string>;
|
|
48
49
|
resetSettings(): Promise<void>;
|
|
49
50
|
factoryReset(): Promise<void>;
|
|
50
51
|
private getMessage;
|
|
@@ -58,7 +58,7 @@ class Management {
|
|
|
58
58
|
getModel() {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
const { model } = yield this.postMessage({
|
|
61
|
-
type: this.getMessage('get_model')
|
|
61
|
+
type: this.getMessage('get_model'),
|
|
62
62
|
});
|
|
63
63
|
return model;
|
|
64
64
|
});
|
|
@@ -66,7 +66,7 @@ class Management {
|
|
|
66
66
|
getSerialNumber() {
|
|
67
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
68
|
const { serialNumber } = yield this.postMessage({
|
|
69
|
-
type: this.getMessage('get_serial_number')
|
|
69
|
+
type: this.getMessage('get_serial_number'),
|
|
70
70
|
});
|
|
71
71
|
return serialNumber;
|
|
72
72
|
});
|
|
@@ -80,7 +80,7 @@ class Management {
|
|
|
80
80
|
getBatteryStatus() {
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
82
|
const { batteryStatus } = yield this.postMessage({
|
|
83
|
-
type: this.getMessage('get_battery_status')
|
|
83
|
+
type: this.getMessage('get_battery_status'),
|
|
84
84
|
});
|
|
85
85
|
return batteryStatus;
|
|
86
86
|
});
|
|
@@ -88,11 +88,19 @@ class Management {
|
|
|
88
88
|
getTemperature() {
|
|
89
89
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
90
|
const { currentTemperature } = yield this.postMessage({
|
|
91
|
-
type: this.getMessage('get_current_temperature')
|
|
91
|
+
type: this.getMessage('get_current_temperature'),
|
|
92
92
|
});
|
|
93
93
|
return currentTemperature;
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
+
getBrand() {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const { brand } = yield this.postMessage({
|
|
99
|
+
type: this.getMessage('get_brand'),
|
|
100
|
+
});
|
|
101
|
+
return brand;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
96
104
|
resetSettings() {
|
|
97
105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
106
|
yield this.postMessage({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Management.js","sourceRoot":"","sources":["../../../src/FrontApplet/Management/Management.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,yCAAkC;AAClC,mCAA4B;AAC5B,qCAA8B;AAC9B,mDAA4C;AAC5C,iCAA0B;AAC1B,+BAAwB;AACxB,6BAAsB;AACtB,mCAA4B;AAC5B,uCAAgC;AAChC,mCAA4B;AAC5B,uCAAgC;AAChC,iCAA0B;AAC1B,yCAAkC;AAClC,mDAA4C;AAC5C,mCAA4B;AAC5B,iDAA0C;AAG1C,MAAqB,UAAU;IAqB9B,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;QAEtC,IAAI,CAAC,GAAG,GAAG,IAAI,aAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9D,IAAI,CAAC,EAAE,GAAG,IAAI,YAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,IAAI,eAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAClE,IAAI,CAAC,KAAK,GAAG,IAAI,eAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACxE,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,gBAA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AQ;;YACpB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;gBACxC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;aAClC,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACd,CAAC;KAAA;IAEY,aAAa;;YACzB,MAAM,IAAI,CAAC,WAAW,CAAC;gBACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;aACvC,CAAC,CAAC;QACJ,CAAC;KAAA;IAEY,YAAY;;YACxB,MAAM,IAAI,CAAC,WAAW,CAAC;gBACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;aACtC,CAAC,CAAC;QACJ,CAAC;KAAA;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,gBAAgB,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC;IAC7C,CAAC;IAEO,gBAAgB;QACvB,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,UAAU,CAAC,cAAc,CAAC;IAC7D,CAAC;;AAnHF,6BAoHC;AAlHc,yBAAc,GAAW,YAAY,CAAC"}
|
|
@@ -20,7 +20,7 @@ class Network {
|
|
|
20
20
|
getActiveInfo() {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const { networkInfo } = yield this.postMessage({
|
|
23
|
-
type: this.getMessage('get_network_info')
|
|
23
|
+
type: this.getMessage('get_network_info'),
|
|
24
24
|
});
|
|
25
25
|
return networkInfo;
|
|
26
26
|
});
|
|
@@ -17,7 +17,7 @@ class OS {
|
|
|
17
17
|
getInfo() {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const { osInfo } = yield this.postMessage({
|
|
20
|
-
type: this.getMessage('get_os_info')
|
|
20
|
+
type: this.getMessage('get_os_info'),
|
|
21
21
|
});
|
|
22
22
|
return osInfo;
|
|
23
23
|
});
|
|
@@ -25,7 +25,7 @@ class OS {
|
|
|
25
25
|
getCpuUsage() {
|
|
26
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
27
|
const { cpuUsage } = yield this.postMessage({
|
|
28
|
-
type: this.getMessage('get_cpu_usage')
|
|
28
|
+
type: this.getMessage('get_cpu_usage'),
|
|
29
29
|
});
|
|
30
30
|
return cpuUsage;
|
|
31
31
|
});
|
|
@@ -33,7 +33,7 @@ class OS {
|
|
|
33
33
|
getMemoryUsage() {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
const { memoryUsage } = yield this.postMessage({
|
|
36
|
-
type: this.getMessage('get_memory_usage')
|
|
36
|
+
type: this.getMessage('get_memory_usage'),
|
|
37
37
|
});
|
|
38
38
|
return memoryUsage;
|
|
39
39
|
});
|