@signageos/front-applet 6.2.1 → 6.4.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 +10 -0
- package/README.md +3 -1
- package/dist/bundle.js +2 -2
- package/dist/bundle.js.map +1 -1
- package/docs/applet-basics.md +3 -3
- package/docs/{js-api → content}/js-browser.md +13 -10
- package/docs/{js-api → content}/js-display.md +15 -5
- package/docs/{js-api → content}/js-file-system.md +4 -16
- package/docs/{js-api → content}/js-offline-cache-simple-data.md +1 -1
- package/docs/{js-api → content}/js-sensors.md +2 -2
- package/docs/{js-api → content}/js-serial.md +1 -1
- package/docs/{js-api → content}/js-video-inputs-internal-ports.md +1 -1
- package/docs/content/js-video-stream.md +560 -0
- package/docs/index.md +3 -3
- package/docs/{management-api → management}/js-management-management.md +60 -20
- package/docs/{management-api → management}/js-management-network.md +3 -3
- package/docs/{management-api → management}/js-management-wifi.md +8 -8
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +4 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +1 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
- package/es6/FrontApplet/Input/IInput.d.ts +11 -0
- package/es6/FrontApplet/Input/IInput.js +3 -0
- package/es6/FrontApplet/Input/IInput.js.map +1 -0
- package/es6/FrontApplet/Input/Input.d.ts +5 -1
- package/es6/FrontApplet/Input/Input.js +6 -0
- package/es6/FrontApplet/Input/Input.js.map +1 -1
- package/es6/FrontApplet/Stream/Stream.d.ts +7 -3
- package/es6/FrontApplet/Stream/Stream.js +234 -63
- package/es6/FrontApplet/Stream/Stream.js.map +1 -1
- package/es6/FrontApplet/Stream/streamEvents.d.ts +1 -1
- package/package.json +8 -5
- package/docs/js-api/js-video-stream.md +0 -491
- /package/docs/{js-api → content}/js-applet-resources.md +0 -0
- /package/docs/{js-api → content}/js-command.md +0 -0
- /package/docs/{js-api → content}/js-debug.md +0 -0
- /package/docs/{js-api → content}/js-device-info.md +0 -0
- /package/docs/{js-api → content}/js-fonts.md +0 -0
- /package/docs/{js-api → content}/js-hardware.md +0 -0
- /package/docs/{js-api → content}/js-iframes.md +0 -0
- /package/docs/{js-api → content}/js-input.md +0 -0
- /package/docs/{js-api → content}/js-offline-cache-media-files.md +0 -0
- /package/docs/{js-api → content}/js-osd.md +0 -0
- /package/docs/{js-api → content}/js-proof-of-play.md +0 -0
- /package/docs/{js-api → content}/js-sync-playback.md +0 -0
- /package/docs/{js-api → content}/js-video.md +0 -0
- /package/docs/{management-api → management}/js-management-application.md +0 -0
- /package/docs/{management-api → management}/js-management-audio.md +0 -0
- /package/docs/{management-api → management}/js-management-debug.md +0 -0
- /package/docs/{management-api → management}/js-management-firmware.md +0 -0
- /package/docs/{management-api → management}/js-management-monitoring-commands.md +0 -0
- /package/docs/{management-api → management}/js-management-monitors.md +0 -0
- /package/docs/{management-api → management}/js-management-os.md +0 -0
- /package/docs/{management-api → management}/js-management-package.md +0 -0
- /package/docs/{management-api → management}/js-management-power.md +0 -0
- /package/docs/{management-api → management}/js-management-proxy.md +0 -0
- /package/docs/{management-api → management}/js-management-remote-control.md +0 -0
- /package/docs/{management-api → management}/js-management-screen.md +0 -0
- /package/docs/{management-api → management}/js-management-security.md +0 -0
- /package/docs/{management-api → management}/js-management-time.md +0 -0
|
@@ -128,7 +128,7 @@ Manually configures a network interface.
|
|
|
128
128
|
If the interface is disabled, it will be enabled.
|
|
129
129
|
|
|
130
130
|
:::warning
|
|
131
|
-
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](
|
|
131
|
+
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](js-management-wifi).
|
|
132
132
|
:::
|
|
133
133
|
|
|
134
134
|
### Object properties
|
|
@@ -176,7 +176,7 @@ Configures a network interface to use DHCP to get an IP address asigned from the
|
|
|
176
176
|
If the interface is disabled, it will be enabled.
|
|
177
177
|
|
|
178
178
|
:::warning
|
|
179
|
-
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](
|
|
179
|
+
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](js-management-wifi).
|
|
180
180
|
:::
|
|
181
181
|
|
|
182
182
|
### Object properties
|
|
@@ -219,5 +219,5 @@ A disabled network interface can be re-enabled simply by calling either `setDHCP
|
|
|
219
219
|
|
|
220
220
|
:::warning
|
|
221
221
|
Don't use this method to disable Wi-Fi.
|
|
222
|
-
Use [Wi-Fi API](
|
|
222
|
+
Use [Wi-Fi API](js-management-wifi) to enable/disable Wi-Fi.
|
|
223
223
|
:::
|
|
@@ -17,7 +17,7 @@ Wi-Fi API allows you to configure Wi-Fi, if the device supports it.
|
|
|
17
17
|
|
|
18
18
|
:::warning
|
|
19
19
|
* Before using this API, ensure that the device supports Wi-Fi via `sos.management.supports("WIFI")`.
|
|
20
|
-
* More info about how to check it, you can find [**THERE**](
|
|
20
|
+
* More info about how to check it, you can find [**THERE**](js-management-management#supports)
|
|
21
21
|
:::
|
|
22
22
|
|
|
23
23
|
## State management
|
|
@@ -50,7 +50,7 @@ AP state is not persistent and on reboot the device will be in DISABLED state.
|
|
|
50
50
|
Different regulations apply to Wi-Fi communication in different countries.
|
|
51
51
|
Under normal circumstances, everything should work with default settings.
|
|
52
52
|
However, if you experience any problems, you might want to try changing Wi-Fi country configuration to your country.
|
|
53
|
-
See [`getCountry()`](
|
|
53
|
+
See [`getCountry()`](js-management-wifi#getcountry) and [`setCountry()`](js-management-wifi#setcountry) methods.
|
|
54
54
|
|
|
55
55
|
## All methods
|
|
56
56
|
|
|
@@ -263,7 +263,7 @@ Call a callback everytime an event is emitted.
|
|
|
263
263
|
|
|
264
264
|
| Param | Type | Required | Description |
|
|
265
265
|
| -------- | -------- | :--------------: | --------------------------------------------------- |
|
|
266
|
-
| `event` | String | <div class="red">Yes</div> | Event name. See [events](
|
|
266
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
|
|
267
267
|
| `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted
|
|
268
268
|
|
|
269
269
|
### Javascript example
|
|
@@ -282,7 +282,7 @@ Call a callback the first time an event is emitted.
|
|
|
282
282
|
|
|
283
283
|
| Param | Type | Required | Description |
|
|
284
284
|
| -------- | -------- | :------------: | ----------------------------------------------------- |
|
|
285
|
-
| `event` | String | <div class="red">Yes</div> | Event name. See [events](
|
|
285
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
|
|
286
286
|
| `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted
|
|
287
287
|
|
|
288
288
|
### Javascript example
|
|
@@ -296,12 +296,12 @@ sos.management.wifi.once('client_disconnected', () => {
|
|
|
296
296
|
```
|
|
297
297
|
|
|
298
298
|
## removeListener()
|
|
299
|
-
Remove an event listener previously registered via [`on`](
|
|
299
|
+
Remove an event listener previously registered via [`on`](js-management-wifi#on) or [`once`](js-management-wifi#once).
|
|
300
300
|
|
|
301
301
|
|
|
302
302
|
| Param | Type | Required | Description |
|
|
303
303
|
| -------- | -------- | :----------: | ------------------------------------------------------- |
|
|
304
|
-
| `event` | String | <div class="red">Yes</div> | Event name. See [events](
|
|
304
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
|
|
305
305
|
| `listener` | Method | <div class="red">Yes</div> | Callback that was previously registered
|
|
306
306
|
|
|
307
307
|
### Javascript example
|
|
@@ -319,12 +319,12 @@ sos.management.wifi.removeListener('client_connected', listener);
|
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
## removeAllListeners()
|
|
322
|
-
Remove all listeners previously registered via [`on`](
|
|
322
|
+
Remove all listeners previously registered via [`on`](js-management-wifi#on) or [`once`](js-management-wifi#once), either for a specific event or for all events.
|
|
323
323
|
|
|
324
324
|
|
|
325
325
|
| Param | Type | Required | Description |
|
|
326
326
|
| ---------------- | ------ | :--------: | -------------------------------------------------------- |
|
|
327
|
-
| `event` | String | <div class="yellow">No</div> | Event name. See [events](
|
|
327
|
+
| `event` | String | <div class="yellow">No</div> | Event name. See [events](js-management-wifi#events) for valid event names.
|
|
328
328
|
|
|
329
329
|
### Javascript example
|
|
330
330
|
```javascript
|
|
@@ -104,6 +104,7 @@ interface IOpenLinkOptions {
|
|
|
104
104
|
headlessMode?: boolean;
|
|
105
105
|
clearData?: boolean;
|
|
106
106
|
canUserClose?: boolean;
|
|
107
|
+
method?: 'native' | 'iframe';
|
|
107
108
|
}
|
|
108
109
|
export default IOpenLinkOptions;
|
|
109
110
|
export declare const VIOpenLinkOptions: {
|
|
@@ -179,4 +180,7 @@ export declare const VIOpenLinkOptions: {
|
|
|
179
180
|
headlessMode: string;
|
|
180
181
|
clearData: string;
|
|
181
182
|
canUserClose: string;
|
|
183
|
+
method: {
|
|
184
|
+
'?string': string[];
|
|
185
|
+
};
|
|
182
186
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOpenLinkOptions.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/IOpenLinkOptions.ts"],"names":[],"mappings":";;;AAkCa,QAAA,OAAO,GAAG;IACtB,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;IACtC,KAAK,EAAE;QACN,SAAS,EAAE;YACV,UAAU,EAAE,SAAS;SACrB;KACD;IACD,MAAM,EAAE;QACP,SAAS,EAAE;YACV,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,SAAS;SAClB;KACD;IACD,OAAO,EAAE;QACR,SAAS,EAAE;YACV,WAAW,EAAE;gBACZ,SAAS,EAAE;oBACV,MAAM,EAAE;wBACP,SAAS,EAAE;4BACV,UAAU,EAAE,SAAS;4BACrB,IAAI,EAAE,SAAS;yBACf;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ,SAAS,EAAE;oBACV,MAAM,EAAE;wBACP,SAAS,EAAE;4BACV,UAAU,EAAE,SAAS;4BACrB,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,SAAS;yBACf;qBACD;oBACD,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE;oBAC/D,IAAI,EAAE,SAAS;iBACf;aACD;YACD,QAAQ,EAAE;gBACT,SAAS,EAAE;oBACV,KAAK,EAAE,SAAS;iBAChB;aACD;SACD;KACD;CACD,CAAC;
|
|
1
|
+
{"version":3,"file":"IOpenLinkOptions.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/IOpenLinkOptions.ts"],"names":[],"mappings":";;;AAkCa,QAAA,OAAO,GAAG;IACtB,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;IACtC,KAAK,EAAE;QACN,SAAS,EAAE;YACV,UAAU,EAAE,SAAS;SACrB;KACD;IACD,MAAM,EAAE;QACP,SAAS,EAAE;YACV,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,SAAS;SAClB;KACD;IACD,OAAO,EAAE;QACR,SAAS,EAAE;YACV,WAAW,EAAE;gBACZ,SAAS,EAAE;oBACV,MAAM,EAAE;wBACP,SAAS,EAAE;4BACV,UAAU,EAAE,SAAS;4BACrB,IAAI,EAAE,SAAS;yBACf;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ,SAAS,EAAE;oBACV,MAAM,EAAE;wBACP,SAAS,EAAE;4BACV,UAAU,EAAE,SAAS;4BACrB,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,SAAS;yBACf;qBACD;oBACD,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE;oBAC/D,IAAI,EAAE,SAAS;iBACf;aACD;YACD,QAAQ,EAAE;gBACT,SAAS,EAAE;oBACV,KAAK,EAAE,SAAS;iBAChB;aACD;SACD;KACD;CACD,CAAC;AA+BW,QAAA,iBAAiB,GAAG;IAChC,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;IAClC,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE;IAClD,kBAAkB,EAAE,UAAU;IAC9B,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE;QACZ,SAAS,EAAE;YACV,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;SAChB;KACD;IACD,KAAK,EAAE,EAAE,SAAS,EAAE,eAAO,EAAE;IAC7B,YAAY,EAAE,UAAU;IACxB,SAAS,EAAE,UAAU;IACrB,YAAY,EAAE,UAAU;IACxB,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;CAC3C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import IKeyUpEventListener from './IKeyUpEventListener';
|
|
2
|
+
import IInputKeyMessage from './IInputKeyMessage';
|
|
3
|
+
import IKeyUpEvent from './IKeyUpEvent';
|
|
4
|
+
export interface IInput {
|
|
5
|
+
window: Window;
|
|
6
|
+
onKeyUp(listener: IKeyUpEventListener): void;
|
|
7
|
+
handleMessageData(data: IInputKeyMessage): void;
|
|
8
|
+
removeEventListeners(): void;
|
|
9
|
+
removeEventListener(event: string, listener: (...args: any[]) => void): void;
|
|
10
|
+
emitKeyUpEvent(event: IKeyUpEvent): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IInput.js","sourceRoot":"","sources":["../../../src/FrontApplet/Input/IInput.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import IKeyUpEventListener from './IKeyUpEventListener';
|
|
2
2
|
import IInputKeyMessage from './IInputKeyMessage';
|
|
3
|
-
|
|
3
|
+
import IKeyUpEvent from './IKeyUpEvent';
|
|
4
|
+
import { IInput } from './IInput';
|
|
5
|
+
export default class Input implements IInput {
|
|
4
6
|
readonly window: Window;
|
|
5
7
|
private messagePrefix;
|
|
6
8
|
static MESSAGE_PREFIX: string;
|
|
@@ -9,6 +11,8 @@ export default class Input {
|
|
|
9
11
|
onKeyUp(listener: IKeyUpEventListener): void;
|
|
10
12
|
handleMessageData(data: IInputKeyMessage): void;
|
|
11
13
|
removeEventListeners(): void;
|
|
14
|
+
removeEventListener(event: string, listener: (...args: any[]) => void): void;
|
|
15
|
+
emitKeyUpEvent(event: IKeyUpEvent): void;
|
|
12
16
|
private dispatchEventToParent;
|
|
13
17
|
private getMessage;
|
|
14
18
|
}
|
|
@@ -38,6 +38,12 @@ class Input {
|
|
|
38
38
|
removeEventListeners() {
|
|
39
39
|
this.eventEmitter.removeAllListeners();
|
|
40
40
|
}
|
|
41
|
+
removeEventListener(event, listener) {
|
|
42
|
+
this.eventEmitter.removeListener(event, listener);
|
|
43
|
+
}
|
|
44
|
+
emitKeyUpEvent(event) {
|
|
45
|
+
this.eventEmitter.emit('keyup', event);
|
|
46
|
+
}
|
|
41
47
|
dispatchEventToParent(event) {
|
|
42
48
|
var _a, _b, _c;
|
|
43
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/FrontApplet/Input/Input.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAsC;AAItC,mDAA4C;
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/FrontApplet/Input/Input.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAsC;AAItC,mDAA4C;AAG5C,MAAqB,KAAK;IAIzB,YAA4B,MAAc,EAAU,aAAqB;QAA7C,WAAM,GAAN,MAAM,CAAQ;QAAU,kBAAa,GAAb,aAAa,CAAQ;QACxE,IAAI,CAAC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MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;aAC7E;iBAAM;gBACN,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;aACzD;;KACD;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,KAAK,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACrE,CAAC;;AAlDF,wBAmDC;AAlDc,oBAAc,GAAW,OAAO,CAAC"}
|
|
@@ -11,9 +11,11 @@ export default class Stream {
|
|
|
11
11
|
static MESSAGE_PREFIX: string;
|
|
12
12
|
private eventEmitter;
|
|
13
13
|
constructor(messagePrefix: string, postMessage: IPostMessage<any>);
|
|
14
|
-
prepare(uri: string, x: number, y: number, width: number, height: number, options?: IStreamPrepareOptions | keyof typeof StreamProtocol): Promise<
|
|
15
|
-
play(uri: string, x: number, y: number, width: number, height: number, options?: IStreamOptions | keyof typeof StreamProtocol): Promise<
|
|
16
|
-
stop(uri: string, x: number, y: number, width: number, height: number): Promise<
|
|
14
|
+
prepare(uri: string, x: number, y: number, width: number, height: number, options?: IStreamPrepareOptions | keyof typeof StreamProtocol): Promise<void>;
|
|
15
|
+
play(uri: string, x: number, y: number, width: number, height: number, options?: IStreamOptions | keyof typeof StreamProtocol): Promise<void>;
|
|
16
|
+
stop(uri: string, x: number, y: number, width: number, height: number): Promise<void>;
|
|
17
|
+
pause(uri: string, x: number, y: number, width: number, height: number): Promise<void>;
|
|
18
|
+
resume(uri: string, x: number, y: number, width: number, height: number): Promise<void>;
|
|
17
19
|
getTracks(videoId: IVideoProperties): Promise<ITrackInfo[]>;
|
|
18
20
|
selectTrack(videoId: IVideoProperties, trackType: TrackType, groupId: string, trackIndex: number): Promise<void>;
|
|
19
21
|
resetTrack(videoId: IVideoProperties, trackType: TrackType, groupId?: string): Promise<void>;
|
|
@@ -24,6 +26,8 @@ export default class Stream {
|
|
|
24
26
|
onPrepare(listener: IStreamEventListener<'prepare'>): void;
|
|
25
27
|
onPlay(listener: IStreamEventListener<'play'>): void;
|
|
26
28
|
onStop(listener: IStreamEventListener<'stop'>): void;
|
|
29
|
+
onPause(listener: IStreamEventListener<'pause'>): void;
|
|
30
|
+
onResume(listener: IStreamEventListener<'resume'>): void;
|
|
27
31
|
handleMessageData(data: IStreamMessage): void;
|
|
28
32
|
removeEventListeners(): void;
|
|
29
33
|
private createAndEmitEvent;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
2
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
13
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -10,10 +19,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
19
|
};
|
|
11
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
21
|
const events_1 = require("events");
|
|
22
|
+
const debugDecorator_1 = require("@signageos/lib/dist/Debug/debugDecorator");
|
|
13
23
|
const AppletStreamError_1 = require("../Error/AppletStreamError");
|
|
14
24
|
const ErrorCodes_1 = require("../Error/ErrorCodes");
|
|
15
25
|
const Validate_1 = require("../Validate/Validate");
|
|
16
26
|
const coordinationsHelper_1 = require("../Dimensions/coordinationsHelper");
|
|
27
|
+
const DEBUG_NAMESPACE = '@signageos/front-applet:FrontApplet:Stream';
|
|
17
28
|
class Stream {
|
|
18
29
|
constructor(messagePrefix, postMessage) {
|
|
19
30
|
this.messagePrefix = messagePrefix;
|
|
@@ -21,97 +32,147 @@ class Stream {
|
|
|
21
32
|
this.eventEmitter = new events_1.EventEmitter();
|
|
22
33
|
}
|
|
23
34
|
prepare(uri, x, y, width, height, options) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
let streamOptions;
|
|
37
|
+
if (typeof options === 'string') {
|
|
38
|
+
streamOptions = { protocol: options };
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
streamOptions = options;
|
|
42
|
+
}
|
|
43
|
+
let protocol = undefined;
|
|
44
|
+
if (streamOptions === null || streamOptions === void 0 ? void 0 : streamOptions.protocol) {
|
|
45
|
+
protocol = streamOptions.protocol;
|
|
46
|
+
}
|
|
47
|
+
if (protocol && typeof protocol !== 'string') {
|
|
48
|
+
throw new AppletStreamError_1.default({
|
|
49
|
+
kind: 'appletStreamError',
|
|
50
|
+
message: 'Invalid format of protocol, must be string.',
|
|
51
|
+
code: ErrorCodes_1.default.STREAM_INVALID_PROTOCOL_TYPE,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
this.checkParamsValidity(uri, x, y, width, height);
|
|
55
|
+
this.createAndEmitEvent('prepare', {
|
|
56
|
+
type: 'prepare',
|
|
57
|
+
srcArguments: {
|
|
58
|
+
uri,
|
|
59
|
+
x,
|
|
60
|
+
y,
|
|
61
|
+
width,
|
|
62
|
+
height,
|
|
63
|
+
protocol,
|
|
64
|
+
},
|
|
40
65
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.createAndEmitEvent('prepare', {
|
|
44
|
-
type: 'prepare',
|
|
45
|
-
srcArguments: {
|
|
66
|
+
return this.postMessage({
|
|
67
|
+
type: this.getMessage('prepare'),
|
|
46
68
|
uri,
|
|
47
69
|
x,
|
|
48
70
|
y,
|
|
49
71
|
width,
|
|
50
72
|
height,
|
|
51
73
|
protocol,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return this.postMessage({
|
|
55
|
-
type: this.getMessage('prepare'),
|
|
56
|
-
uri,
|
|
57
|
-
x,
|
|
58
|
-
y,
|
|
59
|
-
width,
|
|
60
|
-
height,
|
|
61
|
-
protocol,
|
|
62
|
-
options: streamOptions,
|
|
74
|
+
options: streamOptions,
|
|
75
|
+
});
|
|
63
76
|
});
|
|
64
77
|
}
|
|
65
78
|
play(uri, x, y, width, height, options) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
let streamOptions;
|
|
81
|
+
if (typeof options === 'string') {
|
|
82
|
+
// Legacy format
|
|
83
|
+
streamOptions = { protocol: options };
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
// New format
|
|
87
|
+
streamOptions = options;
|
|
88
|
+
}
|
|
89
|
+
let protocol = undefined;
|
|
90
|
+
if (streamOptions === null || streamOptions === void 0 ? void 0 : streamOptions.protocol) {
|
|
91
|
+
protocol = streamOptions.protocol;
|
|
92
|
+
}
|
|
93
|
+
this.checkParamsValidity(uri, x, y, width, height);
|
|
94
|
+
({ x, y, width, height } = coordinationsHelper_1.sanitizeCoordinations({ x, y, width, height }));
|
|
95
|
+
if (protocol && typeof protocol !== 'string') {
|
|
96
|
+
throw new AppletStreamError_1.default({
|
|
97
|
+
kind: 'appletStreamError',
|
|
98
|
+
message: 'Invalid format of protocol, must be string.',
|
|
99
|
+
code: ErrorCodes_1.default.STREAM_INVALID_PROTOCOL_TYPE,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
this.createAndEmitEvent('play', {
|
|
103
|
+
type: 'play',
|
|
104
|
+
srcArguments: {
|
|
105
|
+
uri,
|
|
106
|
+
x,
|
|
107
|
+
y,
|
|
108
|
+
width,
|
|
109
|
+
height,
|
|
110
|
+
protocol,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
return this.postMessage({
|
|
114
|
+
type: this.getMessage('play'),
|
|
115
|
+
uri,
|
|
116
|
+
x,
|
|
117
|
+
y,
|
|
118
|
+
width,
|
|
119
|
+
height,
|
|
120
|
+
protocol,
|
|
121
|
+
options: streamOptions,
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
stop(uri, x, y, width, height) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
this.checkParamsValidity(uri, x, y, width, height);
|
|
128
|
+
({ x, y, width, height } = coordinationsHelper_1.sanitizeCoordinations({ x, y, width, height }));
|
|
129
|
+
this.createAndEmitEvent('stop', {
|
|
130
|
+
type: 'stop',
|
|
131
|
+
srcArguments: {
|
|
132
|
+
uri,
|
|
133
|
+
x,
|
|
134
|
+
y,
|
|
135
|
+
width,
|
|
136
|
+
height,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
return this.postMessage({
|
|
140
|
+
type: this.getMessage('stop'),
|
|
141
|
+
uri,
|
|
142
|
+
x,
|
|
143
|
+
y,
|
|
144
|
+
width,
|
|
145
|
+
height,
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
pause(uri, x, y, width, height) {
|
|
79
150
|
this.checkParamsValidity(uri, x, y, width, height);
|
|
80
151
|
({ x, y, width, height } = coordinationsHelper_1.sanitizeCoordinations({ x, y, width, height }));
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
kind: 'appletStreamError',
|
|
84
|
-
message: 'Invalid format of protocol, must be string.',
|
|
85
|
-
code: ErrorCodes_1.default.STREAM_INVALID_PROTOCOL_TYPE,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
this.createAndEmitEvent('play', {
|
|
89
|
-
type: 'play',
|
|
152
|
+
this.createAndEmitEvent('pause', {
|
|
153
|
+
type: 'pause',
|
|
90
154
|
srcArguments: {
|
|
91
155
|
uri,
|
|
92
156
|
x,
|
|
93
157
|
y,
|
|
94
158
|
width,
|
|
95
159
|
height,
|
|
96
|
-
protocol,
|
|
97
160
|
},
|
|
98
161
|
});
|
|
99
162
|
return this.postMessage({
|
|
100
|
-
type: this.getMessage('
|
|
163
|
+
type: this.getMessage('pause'),
|
|
101
164
|
uri,
|
|
102
165
|
x,
|
|
103
166
|
y,
|
|
104
167
|
width,
|
|
105
168
|
height,
|
|
106
|
-
protocol,
|
|
107
|
-
options: streamOptions,
|
|
108
169
|
});
|
|
109
170
|
}
|
|
110
|
-
|
|
171
|
+
resume(uri, x, y, width, height) {
|
|
111
172
|
this.checkParamsValidity(uri, x, y, width, height);
|
|
112
173
|
({ x, y, width, height } = coordinationsHelper_1.sanitizeCoordinations({ x, y, width, height }));
|
|
113
|
-
this.createAndEmitEvent('
|
|
114
|
-
type: '
|
|
174
|
+
this.createAndEmitEvent('resume', {
|
|
175
|
+
type: 'resume',
|
|
115
176
|
srcArguments: {
|
|
116
177
|
uri,
|
|
117
178
|
x,
|
|
@@ -121,7 +182,7 @@ class Stream {
|
|
|
121
182
|
},
|
|
122
183
|
});
|
|
123
184
|
return this.postMessage({
|
|
124
|
-
type: this.getMessage('
|
|
185
|
+
type: this.getMessage('resume'),
|
|
125
186
|
uri,
|
|
126
187
|
x,
|
|
127
188
|
y,
|
|
@@ -183,6 +244,14 @@ class Stream {
|
|
|
183
244
|
Validate_1.default({ listener }).required().function();
|
|
184
245
|
this.eventEmitter.on('stop', listener);
|
|
185
246
|
}
|
|
247
|
+
onPause(listener) {
|
|
248
|
+
Validate_1.default({ listener }).required().function();
|
|
249
|
+
this.eventEmitter.on('pause', listener);
|
|
250
|
+
}
|
|
251
|
+
onResume(listener) {
|
|
252
|
+
Validate_1.default({ listener }).required().function();
|
|
253
|
+
this.eventEmitter.on('resume', listener);
|
|
254
|
+
}
|
|
186
255
|
handleMessageData(data) {
|
|
187
256
|
var _a, _b, _c, _d, _e, _f;
|
|
188
257
|
switch (data.type) {
|
|
@@ -259,6 +328,108 @@ class Stream {
|
|
|
259
328
|
Validate_1.default({ height }).required().number();
|
|
260
329
|
}
|
|
261
330
|
}
|
|
262
|
-
exports.default = Stream;
|
|
263
331
|
Stream.MESSAGE_PREFIX = 'stream';
|
|
332
|
+
__decorate([
|
|
333
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
334
|
+
__metadata("design:type", Function),
|
|
335
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number, Object]),
|
|
336
|
+
__metadata("design:returntype", Promise)
|
|
337
|
+
], Stream.prototype, "prepare", null);
|
|
338
|
+
__decorate([
|
|
339
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
340
|
+
__metadata("design:type", Function),
|
|
341
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number, Object]),
|
|
342
|
+
__metadata("design:returntype", Promise)
|
|
343
|
+
], Stream.prototype, "play", null);
|
|
344
|
+
__decorate([
|
|
345
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
346
|
+
__metadata("design:type", Function),
|
|
347
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number]),
|
|
348
|
+
__metadata("design:returntype", Promise)
|
|
349
|
+
], Stream.prototype, "stop", null);
|
|
350
|
+
__decorate([
|
|
351
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
352
|
+
__metadata("design:type", Function),
|
|
353
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number]),
|
|
354
|
+
__metadata("design:returntype", Promise)
|
|
355
|
+
], Stream.prototype, "pause", null);
|
|
356
|
+
__decorate([
|
|
357
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
358
|
+
__metadata("design:type", Function),
|
|
359
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number]),
|
|
360
|
+
__metadata("design:returntype", Promise)
|
|
361
|
+
], Stream.prototype, "resume", null);
|
|
362
|
+
__decorate([
|
|
363
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
364
|
+
__metadata("design:type", Function),
|
|
365
|
+
__metadata("design:paramtypes", [Object]),
|
|
366
|
+
__metadata("design:returntype", Promise)
|
|
367
|
+
], Stream.prototype, "getTracks", null);
|
|
368
|
+
__decorate([
|
|
369
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
370
|
+
__metadata("design:type", Function),
|
|
371
|
+
__metadata("design:paramtypes", [Object, String, String, Number]),
|
|
372
|
+
__metadata("design:returntype", Promise)
|
|
373
|
+
], Stream.prototype, "selectTrack", null);
|
|
374
|
+
__decorate([
|
|
375
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
376
|
+
__metadata("design:type", Function),
|
|
377
|
+
__metadata("design:paramtypes", [Object, String, String]),
|
|
378
|
+
__metadata("design:returntype", Promise)
|
|
379
|
+
], Stream.prototype, "resetTrack", null);
|
|
380
|
+
__decorate([
|
|
381
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
382
|
+
__metadata("design:type", Function),
|
|
383
|
+
__metadata("design:paramtypes", [Function]),
|
|
384
|
+
__metadata("design:returntype", void 0)
|
|
385
|
+
], Stream.prototype, "onTracksChanged", null);
|
|
386
|
+
__decorate([
|
|
387
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
388
|
+
__metadata("design:type", Function),
|
|
389
|
+
__metadata("design:paramtypes", [Function]),
|
|
390
|
+
__metadata("design:returntype", void 0)
|
|
391
|
+
], Stream.prototype, "onError", null);
|
|
392
|
+
__decorate([
|
|
393
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
394
|
+
__metadata("design:type", Function),
|
|
395
|
+
__metadata("design:paramtypes", [Function]),
|
|
396
|
+
__metadata("design:returntype", void 0)
|
|
397
|
+
], Stream.prototype, "onConnected", null);
|
|
398
|
+
__decorate([
|
|
399
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
400
|
+
__metadata("design:type", Function),
|
|
401
|
+
__metadata("design:paramtypes", [Function]),
|
|
402
|
+
__metadata("design:returntype", void 0)
|
|
403
|
+
], Stream.prototype, "onDisconnected", null);
|
|
404
|
+
__decorate([
|
|
405
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
406
|
+
__metadata("design:type", Function),
|
|
407
|
+
__metadata("design:paramtypes", [Function]),
|
|
408
|
+
__metadata("design:returntype", void 0)
|
|
409
|
+
], Stream.prototype, "onPrepare", null);
|
|
410
|
+
__decorate([
|
|
411
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
412
|
+
__metadata("design:type", Function),
|
|
413
|
+
__metadata("design:paramtypes", [Function]),
|
|
414
|
+
__metadata("design:returntype", void 0)
|
|
415
|
+
], Stream.prototype, "onPlay", null);
|
|
416
|
+
__decorate([
|
|
417
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
418
|
+
__metadata("design:type", Function),
|
|
419
|
+
__metadata("design:paramtypes", [Function]),
|
|
420
|
+
__metadata("design:returntype", void 0)
|
|
421
|
+
], Stream.prototype, "onStop", null);
|
|
422
|
+
__decorate([
|
|
423
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
424
|
+
__metadata("design:type", Function),
|
|
425
|
+
__metadata("design:paramtypes", [Function]),
|
|
426
|
+
__metadata("design:returntype", void 0)
|
|
427
|
+
], Stream.prototype, "onPause", null);
|
|
428
|
+
__decorate([
|
|
429
|
+
debugDecorator_1.debug(DEBUG_NAMESPACE),
|
|
430
|
+
__metadata("design:type", Function),
|
|
431
|
+
__metadata("design:paramtypes", [Function]),
|
|
432
|
+
__metadata("design:returntype", void 0)
|
|
433
|
+
], Stream.prototype, "onResume", null);
|
|
434
|
+
exports.default = Stream;
|
|
264
435
|
//# sourceMappingURL=Stream.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stream.js","sourceRoot":"","sources":["../../../src/FrontApplet/Stream/Stream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stream.js","sourceRoot":"","sources":["../../../src/FrontApplet/Stream/Stream.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,mCAAsC;AACtC,6EAAiE;AAKjE,kEAA2D;AAC3D,oDAA6C;AAC7C,mDAA4C;AAC5C,2EAA0E;AAM1E,MAAM,eAAe,GAAG,4CAA4C,CAAC;AAErE,MAAqB,MAAM;IAK1B,YAAoB,aAAqB,EAAU,WAA8B;QAA7D,kBAAa,GAAb,aAAa,CAAQ;QAAU,gBAAW,GAAX,WAAW,CAAmB;QAChF,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAY,EAAE,CAAC;IACxC,CAAC;IAGY,OAAO,CACnB,GAAW,EACX,CAAS,EACT,CAAS,EACT,KAAa,EACb,MAAc,EACd,OAA6D;;YAE7D,IAAI,aAAoC,CAAC;YACzC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;gBAChC,aAAa,GAAG,EAAE,QAAQ,EAAE,OAAsC,EAA2B,CAAC;aAC9F;iBAAM;gBACN,aAAa,GAAG,OAAgC,CAAC;aACjD;YAED,IAAI,QAAQ,GAAG,SAAS,CAAC;YACzB,IAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,EAAE;gBAC5B,QAAQ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,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;QACpC,kBAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;QACxC,kBAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;IAC1C,CAAC;;AAzVa,qBAAc,GAAW,QAAQ,CAAC;AAShD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;qCAkDtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;kCAmDtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;kCAsBtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;mCAsBtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;oCAsBtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;uCAKtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;yCAOtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;wCAQtB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;6CAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;qCAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;yCAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;4CAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;uCAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;oCAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;oCAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;qCAItB;AAGD;IADC,sBAAK,CAAC,eAAe,CAAC;;;;sCAItB;AAxQF,yBA2VC"}
|
|
@@ -10,4 +10,4 @@ export interface IStreamErrorEvent extends IStreamEvent<'error'> {
|
|
|
10
10
|
export interface IStreamTracksChangedEvent extends IStreamEvent<'tracks_changed'> {
|
|
11
11
|
tracks: ITrackInfo[] | undefined;
|
|
12
12
|
}
|
|
13
|
-
export declare type StreamEventType = 'connected' | 'disconnected' | 'error' | 'stop' | 'play' | 'prepare' | 'tracks_changed';
|
|
13
|
+
export declare type StreamEventType = 'connected' | 'disconnected' | 'error' | 'stop' | 'play' | 'prepare' | 'pause' | 'resume' | 'tracks_changed';
|