@signageos/front-applet 6.3.0 → 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 +5 -0
- package/dist/bundle.js +2 -2
- package/dist/bundle.js.map +1 -1
- package/docs/content/js-video-stream.md +256 -187
- 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 +2 -2
|
@@ -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;gBAC5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AE,CAAC,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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/front-applet",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"main": "dist/bundle.js",
|
|
5
5
|
"types": "es6/bundle.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@babel/core": "7.6.0",
|
|
38
38
|
"@babel/polyfill": "7.6.0",
|
|
39
39
|
"@babel/preset-env": "7.6.0",
|
|
40
|
-
"@signageos/codestyle": "0.
|
|
40
|
+
"@signageos/codestyle": "0.1.1",
|
|
41
41
|
"@signageos/lib": "10.19.2",
|
|
42
42
|
"@types/debug": "4.1.8",
|
|
43
43
|
"@types/faker": "4.1.5",
|