@signageos/front-applet 8.5.3 → 8.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/dist/bundle.js +7 -7
- package/dist/bundle.js.map +1 -1
- package/docs/fpath/index.md +0 -270
- package/docs/sos/browser.md +0 -14
- package/docs/sos/command.md +0 -18
- package/docs/sos/deviceInfo.md +0 -17
- package/docs/sos/display.md +0 -8
- package/docs/sos/fileSystem.md +0 -488
- package/docs/sos/hardware/index.md +2 -49
- package/docs/sos/input.md +0 -12
- package/docs/sos/native/mdc.md +1 -35
- package/docs/sos/native/nmc.md +127 -0
- package/docs/sos/offline/cache.md +0 -6
- package/docs/sos/offline/index.md +0 -27
- package/docs/sos/proofOfPlay.md +0 -10
- package/docs/sos/stream.md +11 -781
- package/docs/sos/sync.md +5 -21
- package/docs/sos/video.md +0 -86
- package/docs/sos_management/app.md +32 -29
- package/docs/sos_management/index.md +0 -8
- package/docs/sos_management/network.md +0 -19
- package/docs/sos_management/os.md +0 -11
- package/docs/sos_management/power.md +50 -30
- package/docs/sos_management/screen.md +0 -7
- package/docs/sos_management/time.md +0 -3
- package/docs/sos_management/wifi.md +0 -101
- package/es6/FrontApplet/Management/App/App.d.ts +34 -24
- package/es6/FrontApplet/Management/App/App.js.map +1 -1
- package/es6/FrontApplet/Management/Power/IPower.d.ts +32 -10
- package/es6/FrontApplet/Management/Power/IPower.js +3 -0
- package/es6/FrontApplet/Management/Power/IPower.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +12 -8
- package/es6/FrontApplet/Management/Power/Power.js +23 -32
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Power/PowerHelper.d.ts +8 -3
- package/es6/FrontApplet/Management/Power/PowerHelper.js +32 -0
- package/es6/FrontApplet/Management/Power/PowerHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/ProprietaryTimerHelper.d.ts +2 -1
- package/es6/FrontApplet/Management/helpers/TimerHelper.d.ts +3 -1
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +2 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/NMC/CommandsNmc.d.ts +4 -0
- package/es6/FrontApplet/NativeCommands/NMC/CommandsNmc.js +66 -0
- package/es6/FrontApplet/NativeCommands/NMC/CommandsNmc.js.map +1 -0
- package/es6/FrontApplet/NativeCommands/NMC/INativeNmcCommands.d.ts +21 -0
- package/es6/FrontApplet/NativeCommands/NMC/INativeNmcCommands.js +3 -0
- package/es6/FrontApplet/NativeCommands/NMC/INativeNmcCommands.js.map +1 -0
- package/es6/FrontApplet/NativeCommands/NMC/Nmc.d.ts +50 -0
- package/es6/FrontApplet/NativeCommands/NMC/Nmc.js +77 -0
- package/es6/FrontApplet/NativeCommands/NMC/Nmc.js.map +1 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.d.ts +2 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.js +3 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
- package/es6/FrontApplet/Sync/Sync.d.ts +6 -0
- package/es6/FrontApplet/Sync/Sync.js +3 -1
- package/es6/FrontApplet/Sync/Sync.js.map +1 -1
- package/es6/FrontApplet/Video/IOptions.d.ts +5 -0
- package/es6/Monitoring/Management/Power/powerCommands.d.ts +3 -3
- package/package.json +1 -1
|
@@ -35,35 +35,20 @@ Bellow is example list of serial ports that can be used with `sos.hardware.openS
|
|
|
35
35
|
|
|
36
36
|
### openSerialPort()
|
|
37
37
|
|
|
38
|
-
The `openSerialPort()` method opens a serial port for reading/writing. After the port is opened the method returns
|
|
38
|
+
The `openSerialPort()` method opens a serial port for reading/writing. After the port is opened the method returns `ISerialPort` interface.
|
|
39
39
|
|
|
40
40
|
```ts expandable
|
|
41
41
|
openSerialPort(options: ISerialPortOptions): Promise<ISerialPort>;
|
|
42
42
|
// show-more
|
|
43
|
-
/**
|
|
44
|
-
* Options for opening a serial port used by the `sos.hardware.openSerialPort()` method.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* All properties are optional except `baudRate`.
|
|
48
|
-
*/
|
|
49
43
|
interface ISerialPortOptions {
|
|
50
|
-
/** Unique address of the external device. */
|
|
51
44
|
device?: string;
|
|
52
|
-
/** Data transmission speed in bits per second. */
|
|
53
45
|
baudRate: number;
|
|
54
|
-
/** Form of error checking, whether (or what) extra bits are added to a byte. */
|
|
55
46
|
parity?: Parity;
|
|
56
|
-
/** Number of bits in a byte. */
|
|
57
47
|
databits?: number;
|
|
58
|
-
/** Number of bits used to signal the end of a communication packet. */
|
|
59
48
|
stopbits?: number;
|
|
60
|
-
/** Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign. */
|
|
61
49
|
rtscts?: boolean;
|
|
62
50
|
}
|
|
63
51
|
|
|
64
|
-
/**
|
|
65
|
-
* Available parity options for the serial port.
|
|
66
|
-
*/
|
|
67
52
|
enum Parity {
|
|
68
53
|
NONE = "none",
|
|
69
54
|
EVEN = "even",
|
|
@@ -72,41 +57,9 @@ enum Parity {
|
|
|
72
57
|
SPACE = "space"
|
|
73
58
|
}
|
|
74
59
|
|
|
75
|
-
/**
|
|
76
|
-
* Returned by sos.hardware.openSerialPort() method.
|
|
77
|
-
* This interface provides methods to read/write data from/to the serial port.
|
|
78
|
-
*/
|
|
79
60
|
interface ISerialPort {
|
|
80
|
-
/**
|
|
81
|
-
* The `onData()` method sets up a listener, which is called whenever new data are received. The listener will stop after the serial port
|
|
82
|
-
* is closed.
|
|
83
|
-
*
|
|
84
|
-
* @param listener A function that will be called with the received data as a Uint8Array.
|
|
85
|
-
* @returns {void} Returns when the listener is set up.
|
|
86
|
-
*/
|
|
87
61
|
onData(listener: (data: Uint8Array) => void): void;
|
|
88
|
-
/**
|
|
89
|
-
* The `write()` method writes data to the serial port. The data can be a string of hexadecimal digits, array of numbers or Uint8Array.
|
|
90
|
-
*
|
|
91
|
-
* @param data The data to write to the serial port.
|
|
92
|
-
* @returns {Promise<void>} Returns a promise that resolves when the data is successfully written to the serial port.
|
|
93
|
-
* @throws {Error} If the data cannot be written to the serial port.
|
|
94
|
-
* @throws {Error} If the serial port is not open.
|
|
95
|
-
* @throws {Error} If any other error occurs while writing to the serial port.
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* // serial port instance previously created via sos.hardware.openSerialPort()
|
|
99
|
-
* await serialPort.write('68656c6c6f'); // hexadecimal string
|
|
100
|
-
* await serialPort.write([ 10, 20, 30, 40 ]); // array of numbers
|
|
101
|
-
* await serialPort.write(Uint8Array.from([ 10, 20, 30, 40 ])); // Uint8Array
|
|
102
|
-
*/
|
|
103
62
|
write(data: string | number[] | Uint8Array): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* The `close()` method closes the serial port.
|
|
106
|
-
*
|
|
107
|
-
* @returns {Promise<void>} Returns a promise that resolves when the serial port is successfully closed.
|
|
108
|
-
* @throws {Error} If the serial port cannot be closed.
|
|
109
|
-
*/
|
|
110
63
|
close(): Promise<void>;
|
|
111
64
|
}
|
|
112
65
|
|
|
@@ -125,7 +78,7 @@ interface ISerialPort {
|
|
|
125
78
|
|
|
126
79
|
#### Return value
|
|
127
80
|
|
|
128
|
-
Returns a promise that resolves to an instance of
|
|
81
|
+
Returns a promise that resolves to an instance of `ISerialPort` interface, which can be used to read/write data from/to the serial port.
|
|
129
82
|
|
|
130
83
|
#### Possible errors
|
|
131
84
|
|
package/docs/sos/input.md
CHANGED
|
@@ -22,24 +22,12 @@ This feature must be tested by users on real devices.
|
|
|
22
22
|
```ts expandable
|
|
23
23
|
onKeyUp(listener: (event: IKeyUpEvent) => void): void;
|
|
24
24
|
// show-more
|
|
25
|
-
/**
|
|
26
|
-
* KeyUp event interface for handling key release events.
|
|
27
|
-
*/
|
|
28
25
|
interface IKeyUpEvent {
|
|
29
|
-
/** KeyUp event type */
|
|
30
26
|
type: 'keyup';
|
|
31
|
-
/** Key code representing the key that was released */
|
|
32
27
|
keyCode: KeyUpEventMap;
|
|
33
|
-
/** Key name representing the key that was released */
|
|
34
28
|
keyName: keyof typeof KeyUpEventMap;
|
|
35
29
|
}
|
|
36
30
|
|
|
37
|
-
/**
|
|
38
|
-
* Enum of supported key codes for KeyUp events.
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* If a key is not listed here, it will show warning in the console.
|
|
42
|
-
*/
|
|
43
31
|
enum KeyUpEventMap {
|
|
44
32
|
UNKNOWN = 0,
|
|
45
33
|
NUM_0 = 1,
|
package/docs/sos/native/mdc.md
CHANGED
|
@@ -28,29 +28,12 @@ The `sendOne()` method sends an MDC command to another Tizen device on the same
|
|
|
28
28
|
```ts expandable
|
|
29
29
|
sendOne(ipAddress: IpAddressType, command: CodesMDC, data?: number[]): Promise<IMDCResponse>;
|
|
30
30
|
// show-more
|
|
31
|
-
/**
|
|
32
|
-
* Response object returned by Tizen Core App.
|
|
33
|
-
*/
|
|
34
31
|
interface IMDCResponse {
|
|
35
|
-
/**
|
|
36
|
-
* The type of the response, either 'ACK' for acknowledgment or 'NACK' for negative acknowledgment.
|
|
37
|
-
*/
|
|
38
32
|
type: 'ACK' | 'NACK';
|
|
39
|
-
/**
|
|
40
|
-
* The command type that was executed, represented as a number.
|
|
41
|
-
* Should match the command number in {@link CodesMDC}.
|
|
42
|
-
*/
|
|
43
33
|
commandType: number;
|
|
44
|
-
/**
|
|
45
|
-
* The result of the command execution, represented as a number.
|
|
46
|
-
* This value can vary depending on the command executed.
|
|
47
|
-
*/
|
|
48
34
|
result: number;
|
|
49
35
|
}
|
|
50
36
|
|
|
51
|
-
/**
|
|
52
|
-
* This enum contains valid command codes for Tizen MDC communication.
|
|
53
|
-
*/
|
|
54
37
|
enum CodesMDC {
|
|
55
38
|
STATUS_CONTROL = 0,
|
|
56
39
|
VIDEO_CONTROL = 4,
|
|
@@ -170,9 +153,6 @@ enum CodesMDC {
|
|
|
170
153
|
EDIT_NAME_CONTROL = 175,
|
|
171
154
|
VIRTUAL_REMOTE_CONTROL = 176,
|
|
172
155
|
DISPLAY_PORT_DAISY_CHAIN = 177,
|
|
173
|
-
/**
|
|
174
|
-
* 3Screen/4Screen Mode Control
|
|
175
|
-
*/
|
|
176
156
|
THREESCREEN_MODE_CONTROL = 178,
|
|
177
157
|
VIDEO_CONFERENCE_SOUND_MODE_CONTROL = 179,
|
|
178
158
|
VIDEO_STANDBY_CONTROL = 181,
|
|
@@ -205,7 +185,7 @@ enum CodesMDC {
|
|
|
205
185
|
| Name | Type | Required | Description |
|
|
206
186
|
|-------------|------------|------------------|------------------------------------------------------|
|
|
207
187
|
| `ipAddress` | `string` | <div>Yes</div> | The IP address of the device to send the command to. |
|
|
208
|
-
| `command` | `CodesMDC` | <div>Yes</div> | The MDC command to send
|
|
188
|
+
| `command` | `CodesMDC` | <div>Yes</div> | The MDC command to send `CodesMDC`. |
|
|
209
189
|
| `data` | `number[]` | <div>No</div> | The optional data to send with the command. |
|
|
210
190
|
|
|
211
191
|
#### Return value
|
|
@@ -241,23 +221,9 @@ but without explicitly specifying the command.
|
|
|
241
221
|
sendOneRaw(ipAddress: IpAddressType, data: number[] | [
|
|
242
222
|
]): Promise<IMDCResponse>;
|
|
243
223
|
// show-more
|
|
244
|
-
/**
|
|
245
|
-
* Response object returned by Tizen Core App.
|
|
246
|
-
*/
|
|
247
224
|
interface IMDCResponse {
|
|
248
|
-
/**
|
|
249
|
-
* The type of the response, either 'ACK' for acknowledgment or 'NACK' for negative acknowledgment.
|
|
250
|
-
*/
|
|
251
225
|
type: 'ACK' | 'NACK';
|
|
252
|
-
/**
|
|
253
|
-
* The command type that was executed, represented as a number.
|
|
254
|
-
* Should match the command number in {@link CodesMDC}.
|
|
255
|
-
*/
|
|
256
226
|
commandType: number;
|
|
257
|
-
/**
|
|
258
|
-
* The result of the command execution, represented as a number.
|
|
259
|
-
* This value can vary depending on the command executed.
|
|
260
|
-
*/
|
|
261
227
|
result: number;
|
|
262
228
|
}
|
|
263
229
|
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 0
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# nmc
|
|
6
|
+
|
|
7
|
+
The `sos.native.nmc` API groups together methods for controlling WebOs devices using NMC commands.
|
|
8
|
+
|
|
9
|
+
:::warning
|
|
10
|
+
This API is currently available on WebOs devices only.
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
<details>
|
|
14
|
+
<summary>NMC Management Capabilities</summary>
|
|
15
|
+
| Capability | Description |
|
|
16
|
+
|:------------|:-------------|
|
|
17
|
+
| `NATIVE_COMMANDS_NMC` | If device supports performing NMC commands |
|
|
18
|
+
|
|
19
|
+
If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
20
|
+
</details>
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
### sendOne()
|
|
25
|
+
|
|
26
|
+
The `sendOne()` method sends an NMC command to another WebOS device on the same network or to the localhost.
|
|
27
|
+
|
|
28
|
+
```ts expandable
|
|
29
|
+
sendOne(ipAddress: IpAddressType, command: typeof NmcCommands, data: string[] | [
|
|
30
|
+
]): Promise<INMCResponse>;
|
|
31
|
+
// show-more
|
|
32
|
+
interface INMCResponse {
|
|
33
|
+
type: 'ACK' | 'NACK';
|
|
34
|
+
commandType: string[];
|
|
35
|
+
result: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const NmcCommands = [
|
|
39
|
+
['k', 'a'], // Power
|
|
40
|
+
['k', 'b'], // Input Select
|
|
41
|
+
['k', 'c'], // Aspect Ratio
|
|
42
|
+
['k', 'd'], // Screen Mute
|
|
43
|
+
['k', 'e'], // Volume Mute
|
|
44
|
+
['k', 'f'], // Volume Control
|
|
45
|
+
['k', 'g'], // Contrast
|
|
46
|
+
['k', 'h'], // Brightness
|
|
47
|
+
['k', 'i'], // Color
|
|
48
|
+
['k', 'j'], // Tint
|
|
49
|
+
['k', 'k'], // Sharpness
|
|
50
|
+
['k', 'l'], // OSD Select
|
|
51
|
+
['k', 'm'], // Remote Lock/Key Lock
|
|
52
|
+
['k', 't'], // Balance
|
|
53
|
+
['k', 'u'], // Color Temperature
|
|
54
|
+
['k', 'z'], // Abnormal state
|
|
55
|
+
['j', 'p'], // ISM mode
|
|
56
|
+
['j', 'u'], // Auto configuration
|
|
57
|
+
['m', 'c'], // Key
|
|
58
|
+
['d', 'd'], // Tile Mode
|
|
59
|
+
['d', 'e'], // Tile H Position
|
|
60
|
+
['d', 'f'], // Tile V Position
|
|
61
|
+
['d', 'g'], // Tile H Size
|
|
62
|
+
['d', 'h'], // Tile V Size
|
|
63
|
+
['d', 'i'], // Tile ID Set
|
|
64
|
+
['d', 'j'], // Natural Mode (In Tile mode)
|
|
65
|
+
['d', 'x'], // Picture Mode (PSM)
|
|
66
|
+
['d', 'y'], // Sound Mode
|
|
67
|
+
['d', 'w'], // Fan Fault check
|
|
68
|
+
['d', 'l'], // Elapsed time return
|
|
69
|
+
['d', 'n'], // Temperature value
|
|
70
|
+
['d', 'd'], // Lamp fault check
|
|
71
|
+
['d', 'u'], // Auto Volume
|
|
72
|
+
['d', 'v'], // Speak
|
|
73
|
+
['f', 'a'], // Time
|
|
74
|
+
['f', 'd'], // On Timer(On/Off Timer)Time
|
|
75
|
+
['f', 'e'], // Off Timer(On/Off Timer) Time
|
|
76
|
+
['f', 'u'], // Scheduling Input Select
|
|
77
|
+
['f', 'f'], // Sleep Time
|
|
78
|
+
['f', 'g'], // Auto Sleep
|
|
79
|
+
['f', 'h'], // Power On Delay
|
|
80
|
+
['f', 'i'], // Language
|
|
81
|
+
['f', 'j'], // DPM Select
|
|
82
|
+
['f', 'k'], // Reset
|
|
83
|
+
['f', 'l'], // Power Saving
|
|
84
|
+
['f', 'o'], // Power Indicator
|
|
85
|
+
['f', 'p'], // Logo Indicator
|
|
86
|
+
['f', 'y'], // Serial no
|
|
87
|
+
['f', 'z'], // S/W Version
|
|
88
|
+
['x', 'b'], // Input Select
|
|
89
|
+
['f', '#'], // USB Connection Check
|
|
90
|
+
['f', '#'], // USB File List Count.
|
|
91
|
+
['f', '#'], // USB Get File Info.
|
|
92
|
+
['f', '#'], // USB Media Control
|
|
93
|
+
['f', '#'], // USB Add Play List
|
|
94
|
+
['f', '#'], // USB Add Schedule
|
|
95
|
+
['f', '#'], // USB Set Schedule
|
|
96
|
+
][0];
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Params
|
|
101
|
+
|
|
102
|
+
| Name | Type | Required | Description |
|
|
103
|
+
|-------------|----------------------|------------------|--------------------------------------------------------------------|
|
|
104
|
+
| `ipAddress` | `string` | <div>Yes</div> | The IP address of the device to send the command to. |
|
|
105
|
+
| `command` | `typeof NmcCommands` | <div>Yes</div> | The NMC command to send. See `NmcCommands` for available commands. |
|
|
106
|
+
| `data` | `string[] \| []` | <div>Yes</div> | The optional data to send with the command. |
|
|
107
|
+
|
|
108
|
+
#### Return value
|
|
109
|
+
|
|
110
|
+
NMC response object containing the result of the command execution.
|
|
111
|
+
|
|
112
|
+
#### Possible errors
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
- If the `ipAddress` is not a valid string or if the `command` is not a valid number.
|
|
116
|
+
- If the `data` is not an array of strings.
|
|
117
|
+
- If any error occurs during the command execution.
|
|
118
|
+
|
|
119
|
+
#### Example
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
// Send a command to a WebOS device at IP address for menu open
|
|
123
|
+
await sos.native.nmc.sendOne('192.168.0.10', ['m','c'], ['43']);
|
|
124
|
+
|
|
125
|
+
// Send a command to a WebOS device at IP address for device power on
|
|
126
|
+
await sos.native.nmc.sendOne('192.168.0.10', ['k', 'a'], ['1']);
|
|
127
|
+
```
|
|
@@ -155,9 +155,6 @@ The `getChecksumFile()` computes a checksum of the file specified by `uid`.
|
|
|
155
155
|
```ts expandable
|
|
156
156
|
getChecksumFile(uid: string, hashType: HashAlgorithm): Promise<string>;
|
|
157
157
|
// show-more
|
|
158
|
-
/**
|
|
159
|
-
* Represents the supported hash algorithms by Core Apps.
|
|
160
|
-
*/
|
|
161
158
|
type HashAlgorithm = 'md5' | 'crc32' | AnyString;
|
|
162
159
|
|
|
163
160
|
type AnyString = string & {};
|
|
@@ -515,9 +512,6 @@ The `validateChecksumFile()` method validates whether the file, specified by `ui
|
|
|
515
512
|
```ts expandable
|
|
516
513
|
validateChecksumFile(uid: string, hash: string, hashType: HashAlgorithm): Promise<boolean>;
|
|
517
514
|
// show-more
|
|
518
|
-
/**
|
|
519
|
-
* Represents the supported hash algorithms by Core Apps.
|
|
520
|
-
*/
|
|
521
515
|
type HashAlgorithm = 'md5' | 'crc32' | AnyString;
|
|
522
516
|
|
|
523
517
|
type AnyString = string & {};
|
|
@@ -37,21 +37,13 @@ The file URL must point to a file. If your URI leads to a redirect (e.g. from ht
|
|
|
37
37
|
```ts expandable
|
|
38
38
|
addFile(file: ISaveFile): Promise<void>;
|
|
39
39
|
// show-more
|
|
40
|
-
/**
|
|
41
|
-
* Interface represents a file that can be saved to cache and loaded into applet resources.
|
|
42
|
-
*/
|
|
43
40
|
interface ISaveFile {
|
|
44
|
-
/** Unique identifier for the file. This is used to reference the file in the applet. */
|
|
45
41
|
uid: string;
|
|
46
|
-
/** URI of the file to be saved. */
|
|
47
42
|
uri: string;
|
|
48
|
-
/** Type of the file, e.g. 'javascript', 'css', etc. */
|
|
49
43
|
type: IFileType;
|
|
50
|
-
/** HTTP headers to be sent with the request for the file. */
|
|
51
44
|
headers?: {
|
|
52
45
|
[key: string]: string;
|
|
53
46
|
};
|
|
54
|
-
/** Additional flags for appending stored files to the DOM or other operations. */
|
|
55
47
|
flags?: IFlag[];
|
|
56
48
|
}
|
|
57
49
|
|
|
@@ -111,21 +103,13 @@ CSS and JavaScript files are specific because they must be loaded with an HTML t
|
|
|
111
103
|
```ts expandable
|
|
112
104
|
addFiles(files: ISaveFile[]): Promise<Awaited<void>[]>;
|
|
113
105
|
// show-more
|
|
114
|
-
/**
|
|
115
|
-
* Interface represents a file that can be saved to cache and loaded into applet resources.
|
|
116
|
-
*/
|
|
117
106
|
interface ISaveFile {
|
|
118
|
-
/** Unique identifier for the file. This is used to reference the file in the applet. */
|
|
119
107
|
uid: string;
|
|
120
|
-
/** URI of the file to be saved. */
|
|
121
108
|
uri: string;
|
|
122
|
-
/** Type of the file, e.g. 'javascript', 'css', etc. */
|
|
123
109
|
type: IFileType;
|
|
124
|
-
/** HTTP headers to be sent with the request for the file. */
|
|
125
110
|
headers?: {
|
|
126
111
|
[key: string]: string;
|
|
127
112
|
};
|
|
128
|
-
/** Additional flags for appending stored files to the DOM or other operations. */
|
|
129
113
|
flags?: IFlag[];
|
|
130
114
|
}
|
|
131
115
|
|
|
@@ -189,21 +173,13 @@ The order in which the files are downloaded and stored **is** guaranteed.
|
|
|
189
173
|
```ts expandable
|
|
190
174
|
addFilesSync(files: ISaveFile[]): Promise<void>;
|
|
191
175
|
// show-more
|
|
192
|
-
/**
|
|
193
|
-
* Interface represents a file that can be saved to cache and loaded into applet resources.
|
|
194
|
-
*/
|
|
195
176
|
interface ISaveFile {
|
|
196
|
-
/** Unique identifier for the file. This is used to reference the file in the applet. */
|
|
197
177
|
uid: string;
|
|
198
|
-
/** URI of the file to be saved. */
|
|
199
178
|
uri: string;
|
|
200
|
-
/** Type of the file, e.g. 'javascript', 'css', etc. */
|
|
201
179
|
type: IFileType;
|
|
202
|
-
/** HTTP headers to be sent with the request for the file. */
|
|
203
180
|
headers?: {
|
|
204
181
|
[key: string]: string;
|
|
205
182
|
};
|
|
206
|
-
/** Additional flags for appending stored files to the DOM or other operations. */
|
|
207
183
|
flags?: IFlag[];
|
|
208
184
|
}
|
|
209
185
|
|
|
@@ -258,11 +234,8 @@ using `addFile()`, because it also generates appropriate font-face definition.
|
|
|
258
234
|
addFont(font: IAddFont): Promise<void>;
|
|
259
235
|
// show-more
|
|
260
236
|
interface IAddFont extends IFontFaceProperties {
|
|
261
|
-
/** Unique identifier for the font face. This is used to reference the font in the applet. */
|
|
262
237
|
uid: string;
|
|
263
|
-
/** Element to which the font face will be appended. */
|
|
264
238
|
append: HTMLElement;
|
|
265
|
-
/** Available formats for the font. */
|
|
266
239
|
formats: IFontFormats;
|
|
267
240
|
}
|
|
268
241
|
|
package/docs/sos/proofOfPlay.md
CHANGED
|
@@ -18,23 +18,13 @@ with additional metadata about current applet and device to signageOS.
|
|
|
18
18
|
```ts expandable
|
|
19
19
|
recordItemPlayed(options: IRecordItemOptions): Promise<void>;
|
|
20
20
|
// show-more
|
|
21
|
-
/**
|
|
22
|
-
* Interface representing options for a record item in the Proof of Play applet.
|
|
23
|
-
*/
|
|
24
21
|
interface IRecordItemOptions {
|
|
25
|
-
/** The name of the item that was played. */
|
|
26
22
|
name: string;
|
|
27
|
-
/** An optional custom identifier for the item. */
|
|
28
23
|
customId?: string;
|
|
29
|
-
/** The type of the item that was played. */
|
|
30
24
|
type?: 'video' | 'image' | 'html' | 'custom';
|
|
31
|
-
/** An array of tags associated with the item. */
|
|
32
25
|
tags?: string[];
|
|
33
|
-
/** The name of the file that was played. */
|
|
34
26
|
fileName?: string;
|
|
35
|
-
/** A boolean indicating whether the playback was successful. */
|
|
36
27
|
playbackSuccess?: boolean;
|
|
37
|
-
/** An optional error message if the playback was not successful. */
|
|
38
28
|
errorMessage?: string;
|
|
39
29
|
}
|
|
40
30
|
|