@signageos/front-applet 5.4.2 → 5.6.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 +8 -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-hardware-serial.md +9 -6
- package/docs/js-api/js-osd.md +34 -0
- package/docs/management-api/2-js-management-os.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/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 +2 -0
- package/es6/FrontApplet/Management/Management.js +4 -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/OSD/OSD.d.ts +9 -0
- package/es6/FrontApplet/OSD/OSD.js +30 -0
- package/es6/FrontApplet/OSD/OSD.js.map +1 -0
- 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/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
|
|
@@ -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
|
|
@@ -84,14 +85,15 @@ you can call following methods on it.
|
|
|
84
85
|
::: table-responsive
|
|
85
86
|
| Method | Description | Supported since |
|
|
86
87
|
| ---------- | ----------------------------------------------------------- | :-------------: |
|
|
87
|
-
| `onData()` | Call a listener callback anytime serial port
|
|
88
|
+
| `onData()` | Call a listener callback anytime the opened serial port receiving data. | 4.4.0 |
|
|
88
89
|
| `write()` | Write data to the serial port | 4.4.0 |
|
|
89
90
|
| `close()` | Close serial port | 4.4.0 |
|
|
90
91
|
:::
|
|
91
92
|
|
|
92
93
|
## onData()
|
|
93
94
|
|
|
94
|
-
Call a listener callback anytime serial port
|
|
95
|
+
Call a listener callback anytime the opened serial port receiving data.
|
|
96
|
+
The listener will stop if the serial port is closed.
|
|
95
97
|
|
|
96
98
|
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
99
|
and should be processed further according to the requirements of your application.
|
|
@@ -115,12 +117,12 @@ serialPort.onData((data) => {
|
|
|
115
117
|
|
|
116
118
|
## write()
|
|
117
119
|
|
|
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).
|
|
120
|
+
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
121
|
|
|
120
122
|
### Javascript example
|
|
121
123
|
```javascript
|
|
122
124
|
// serial port instance previously created via sos.hardware.openSerialPort()
|
|
123
|
-
await serialPort.write('
|
|
125
|
+
await serialPort.write('68656c6c6f'); // hexadecimal string
|
|
124
126
|
await serialPort.write([ 10, 20, 30, 40 ]); // array of numbers
|
|
125
127
|
await serialPort.write(Uint8Array.from([ 10, 20, 30, 40 ])); // Uint8Array
|
|
126
128
|
```
|
|
@@ -137,7 +139,8 @@ await serialPort.close();
|
|
|
137
139
|
|
|
138
140
|
## Errors
|
|
139
141
|
|
|
140
|
-
Following errors may occur when working with the serial ports.
|
|
142
|
+
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.
|
|
143
|
+
|
|
141
144
|
|
|
142
145
|
::: table-responsive
|
|
143
146
|
| Code | Type | Message |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: OSD
|
|
3
|
+
author: Patrik Bily
|
|
4
|
+
date: 24.10.2022
|
|
5
|
+
type: js-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- osd
|
|
11
|
+
- js_api
|
|
12
|
+
description: "[Content JS API] OSD API allows you to open OSD."
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# OSD
|
|
16
|
+
|
|
17
|
+
OSD API allows you to open OSD for initial setup with applet.
|
|
18
|
+
|
|
19
|
+
## All methods
|
|
20
|
+
|
|
21
|
+
::: table-responsive
|
|
22
|
+
| Method | Description | Supported since |
|
|
23
|
+
| ------------------ | ---------------------- | :-------------: |
|
|
24
|
+
| `showOSD()` |Open OSD on the display | 5.5.0 |
|
|
25
|
+
:::
|
|
26
|
+
|
|
27
|
+
## showOSD()
|
|
28
|
+
|
|
29
|
+
This method allow you to open OSD through the JS API without typing the pin.
|
|
30
|
+
|
|
31
|
+
### Javascript example
|
|
32
|
+
```javascript
|
|
33
|
+
await sos.osd.showOSD();
|
|
34
|
+
```
|
|
@@ -27,6 +27,14 @@ OS management API allows you to manage information of operating system on your c
|
|
|
27
27
|
## getInfo()
|
|
28
28
|
Method `getInfo()` will specify info about device like a what current version of is is installed on a device.
|
|
29
29
|
|
|
30
|
+
Major version of current operating system. It's usually 1 or 2 digits including or excluding dot notation.
|
|
31
|
+
|
|
32
|
+
**Examples:**
|
|
33
|
+
|
|
34
|
+
- Windows -> 7, 8, 10, 11
|
|
35
|
+
- WebOS -> 3, 3.2, 4, 4.1, 6
|
|
36
|
+
- Tizen -> 2.4, 3, 4, 5, 6.5
|
|
37
|
+
|
|
30
38
|
### Javascript example
|
|
31
39
|
```javascript
|
|
32
40
|
sos.management.os.getInfo().then((info) => {
|
|
@@ -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,C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AO,KAAK,EAAE;QAC/C,OAAO,CAAC,IAAI,CACX,gBAAgB,SAAS,KAAK,KAAK,0CAA0C,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;
|
|
@@ -17,6 +17,7 @@ import FileSystem from './FileSystem/FileSystem';
|
|
|
17
17
|
import Management from './Management/Management';
|
|
18
18
|
import Monitors from './Monitors/Monitors';
|
|
19
19
|
import Sensors from './Sensors/Sensors';
|
|
20
|
+
import OSD from './OSD/OSD';
|
|
20
21
|
export default class FrontApplet {
|
|
21
22
|
readonly window: Window & WeinreData;
|
|
22
23
|
private messagePrefix;
|
|
@@ -41,6 +42,7 @@ export default class FrontApplet {
|
|
|
41
42
|
readonly fileSystem: FileSystem;
|
|
42
43
|
readonly management: Management;
|
|
43
44
|
readonly monitors: Monitors;
|
|
45
|
+
readonly osd: OSD;
|
|
44
46
|
readonly sensors: Sensors;
|
|
45
47
|
private readyEmitter;
|
|
46
48
|
private invocationResponseEmitter;
|
|
@@ -23,6 +23,7 @@ const Management_1 = require("./Management/Management");
|
|
|
23
23
|
const Monitors_1 = require("./Monitors/Monitors");
|
|
24
24
|
const Sensors_1 = require("./Sensors/Sensors");
|
|
25
25
|
const Exchange_1 = require("./Exchange/Exchange");
|
|
26
|
+
const OSD_1 = require("./OSD/OSD");
|
|
26
27
|
class FrontApplet {
|
|
27
28
|
constructor(window, messagePrefix) {
|
|
28
29
|
this.window = window;
|
|
@@ -47,12 +48,13 @@ class FrontApplet {
|
|
|
47
48
|
this.fileSystem = new FileSystem_1.default(this.messagePrefix, this.postMessage.bind(this));
|
|
48
49
|
this.management = new Management_1.default(messagePrefix, this.postMessage.bind(this));
|
|
49
50
|
this.monitors = new Monitors_1.default(messagePrefix, this.postMessage.bind(this));
|
|
51
|
+
this.osd = new OSD_1.default(messagePrefix, this.postMessage.bind(this));
|
|
50
52
|
this.sensors = new Sensors_1.default(messagePrefix);
|
|
51
53
|
this.javascriptLoadFileController = new JavascriptLoadFileController_1.default(this.window);
|
|
52
54
|
this.window.addEventListener('message', (event) => this.handleMessage(event));
|
|
53
55
|
this.window.addEventListener('keyup', (event) => this.input.handleKeyEvent(event));
|
|
54
56
|
this.postMessage({
|
|
55
|
-
type: messagePrefix + '_api.ready'
|
|
57
|
+
type: messagePrefix + '_api.ready',
|
|
56
58
|
});
|
|
57
59
|
this.startPinging();
|
|
58
60
|
}
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"FrontApplet.js","sourceRoot":"","sources":["../../src/FrontApplet/FrontApplet.ts"],"names":[],"mappings":";;AACA,mCA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nB,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;AAtND,8BAsNC;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
|
});
|
|
@@ -16,6 +16,7 @@ import Wifi from './Wifi';
|
|
|
16
16
|
import Security from './Security';
|
|
17
17
|
import Proxy from './Proxy';
|
|
18
18
|
import PeerRecovery from './PeerRecovery';
|
|
19
|
+
import OSD from '../OSD/OSD';
|
|
19
20
|
export default class Management {
|
|
20
21
|
private messagePrefix;
|
|
21
22
|
private postMessage;
|
|
@@ -35,6 +36,7 @@ export default class Management {
|
|
|
35
36
|
readonly security: Security;
|
|
36
37
|
readonly proxy: Proxy;
|
|
37
38
|
readonly peerRecovery: PeerRecovery;
|
|
39
|
+
readonly osd: OSD;
|
|
38
40
|
constructor(messagePrefix: string, postMessage: IPostMessage<any>);
|
|
39
41
|
supports(capability: string): Promise<boolean>;
|
|
40
42
|
getModel(): Promise<string>;
|
|
@@ -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,7 +88,7 @@ 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
|
});
|
|
@@ -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;
|
|
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,EA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H,OAAO,kBAAkB,CAAC;QAC3B,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;;AA5GF,6BA6GC;AA3Gc,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
|
});
|
|
@@ -17,7 +17,7 @@ class PeerRecovery {
|
|
|
17
17
|
isEnabled() {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const { enabled } = yield this.postMessage({
|
|
20
|
-
type: this.getMessage('peer_recovery_is_enabled')
|
|
20
|
+
type: this.getMessage('peer_recovery_is_enabled'),
|
|
21
21
|
});
|
|
22
22
|
return enabled;
|
|
23
23
|
});
|
|
@@ -27,7 +27,7 @@ class PeerRecovery {
|
|
|
27
27
|
yield this.postMessage({
|
|
28
28
|
type: this.getMessage('set_peer_recovery'),
|
|
29
29
|
enabled: args[0],
|
|
30
|
-
time: args[1]
|
|
30
|
+
time: args[1],
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -19,14 +19,14 @@ class Power {
|
|
|
19
19
|
systemReboot() {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
yield this.postMessage({
|
|
22
|
-
type: this.getMessage('reboot_system')
|
|
22
|
+
type: this.getMessage('reboot_system'),
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
appRestart() {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
yield this.postMessage({
|
|
29
|
-
type: this.getMessage('restart_app')
|
|
29
|
+
type: this.getMessage('restart_app'),
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -58,7 +58,7 @@ class Power {
|
|
|
58
58
|
timeOn,
|
|
59
59
|
timeOff,
|
|
60
60
|
weekdays,
|
|
61
|
-
volume
|
|
61
|
+
volume,
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
}
|
|
@@ -17,7 +17,7 @@ class Proxy {
|
|
|
17
17
|
isEnabled() {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const { isEnabled } = yield this.postMessage({
|
|
20
|
-
type: this.getMessage('proxy_is_enabled')
|
|
20
|
+
type: this.getMessage('proxy_is_enabled'),
|
|
21
21
|
});
|
|
22
22
|
return isEnabled;
|
|
23
23
|
});
|
|
@@ -36,14 +36,14 @@ class Proxy {
|
|
|
36
36
|
disable() {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
38
|
yield this.postMessage({
|
|
39
|
-
type: this.getMessage('proxy_disable')
|
|
39
|
+
type: this.getMessage('proxy_disable'),
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
getConnectedTo() {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
const { connectedTo } = yield this.postMessage({
|
|
46
|
-
type: this.getMessage('proxy_get_connected_to')
|
|
46
|
+
type: this.getMessage('proxy_get_connected_to'),
|
|
47
47
|
});
|
|
48
48
|
return connectedTo;
|
|
49
49
|
});
|
|
@@ -27,7 +27,7 @@ class RemoteControl {
|
|
|
27
27
|
isEnabled() {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
29
|
const { isRemoteControlEnabled } = yield this.postMessage({
|
|
30
|
-
type: this.getMessage('get_is_remote_control_enabled')
|
|
30
|
+
type: this.getMessage('get_is_remote_control_enabled'),
|
|
31
31
|
});
|
|
32
32
|
return isRemoteControlEnabled;
|
|
33
33
|
});
|
|
@@ -49,7 +49,7 @@ class RemoteControl {
|
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
50
|
yield this.postMessage({
|
|
51
51
|
type: this.getMessage('set_remote_control_enabled'),
|
|
52
|
-
enabled
|
|
52
|
+
enabled,
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
}
|