uneeq-js 2.40.1 → 2.40.2
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/index.js +3 -3
- package/dist/src/service/prom.d.ts +4 -1
- package/dist/umd/index.js +18 -5
- package/package.json +1 -1
- package/readme.md +3 -0
|
@@ -6,7 +6,8 @@ export declare enum PromMessageType {
|
|
|
6
6
|
WebRtcPerformance = 1,
|
|
7
7
|
AvailabilityCheck = 2,
|
|
8
8
|
QuestionMessageReceived = 3,
|
|
9
|
-
AnswerMessageReceived = 4
|
|
9
|
+
AnswerMessageReceived = 4,
|
|
10
|
+
SessionEnded = 5
|
|
10
11
|
}
|
|
11
12
|
export interface PromMessage {
|
|
12
13
|
type: PromMessageType;
|
|
@@ -18,6 +19,7 @@ export declare class Prom {
|
|
|
18
19
|
prom_prefix: string;
|
|
19
20
|
registry: Registry;
|
|
20
21
|
messageTimings: any;
|
|
22
|
+
private metricsIntervalId;
|
|
21
23
|
metricsPushedCounter: Counter;
|
|
22
24
|
sessionStartTime: Histogram;
|
|
23
25
|
availabilityCheckTime: Histogram;
|
|
@@ -32,4 +34,5 @@ export declare class Prom {
|
|
|
32
34
|
handleMessage(msg: PromMessage): void;
|
|
33
35
|
calculateConversationRtt(msg: PromMessage): number;
|
|
34
36
|
sendMetrics(): void;
|
|
37
|
+
private stopSendingMetrics;
|
|
35
38
|
}
|
package/dist/umd/index.js
CHANGED
|
@@ -5805,7 +5805,6 @@ class Uneeq {
|
|
|
5805
5805
|
* Initialise the session. ReadyMessage will be sent when init is ready.
|
|
5806
5806
|
*/
|
|
5807
5807
|
init() {
|
|
5808
|
-
this.initPromMetricsListener();
|
|
5809
5808
|
this.startSessionTime = Date.now();
|
|
5810
5809
|
this.api.startSession(this.startSessionData).then((session) => {
|
|
5811
5810
|
this.session = session;
|
|
@@ -5820,7 +5819,6 @@ class Uneeq {
|
|
|
5820
5819
|
*/
|
|
5821
5820
|
initWithToken(tokenId) {
|
|
5822
5821
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5823
|
-
this.initPromMetricsListener();
|
|
5824
5822
|
this.startSessionTime = Date.now();
|
|
5825
5823
|
try {
|
|
5826
5824
|
this.startSessionData.tokenId = tokenId;
|
|
@@ -6137,6 +6135,7 @@ class Uneeq {
|
|
|
6137
6135
|
*/
|
|
6138
6136
|
initialize() {
|
|
6139
6137
|
if (this.session) {
|
|
6138
|
+
this.initPromMetricsListener();
|
|
6140
6139
|
this.api.callId = this.session.id;
|
|
6141
6140
|
this.initAvatar();
|
|
6142
6141
|
const messagingOptions = {
|
|
@@ -18096,7 +18095,7 @@ function zipAll(project) {
|
|
|
18096
18095
|
/* 224 */
|
|
18097
18096
|
/***/ (function(module) {
|
|
18098
18097
|
|
|
18099
|
-
module.exports = JSON.parse("{\"name\":\"uneeq-js\",\"version\":\"2.40.
|
|
18098
|
+
module.exports = JSON.parse("{\"name\":\"uneeq-js\",\"version\":\"2.40.2\",\"description\":\"\",\"main\":\"dist/index.js\",\"types\":\"dist/src/index.d.ts\",\"scripts\":{\"start\":\"npx webpack -w\",\"test-local\":\"./node_modules/karma/bin/karma start karma.conf.js -logLevel=DEBUG\",\"test\":\"./node_modules/karma/bin/karma start --browsers ChromeHeadless --single-run\",\"test:windows\":\"karma start karma.conf.js\",\"build\":\"webpack --config webpack.config.prod.js && webpack --config webpack.config.umd.js\",\"lint\":\"./node_modules/tslint/bin/tslint -p tsconfig.json --fix\",\"docs\":\"./node_modules/typedoc/bin/typedoc --options\"},\"files\":[\"dist\",\"!dist/test\"],\"author\":\"\",\"license\":\"ISC\",\"dependencies\":{\"@stomp/stompjs\":\"^6.0.0\",\"@uehreka/seriously\":\"^1.0.1\",\"fast-text-encoding\":\"^1.0.0\",\"intrinsic-scale\":\"^3.0.4\",\"promjs\":\"^0.4.1\",\"rxjs\":\"^6.2.2\",\"rxjs-compat\":\"^6.3.2\",\"simple-peer\":\"9.11.0\",\"webrtc-adapter\":\"8.1.0\"},\"devDependencies\":{\"@types/jasmine\":\"^2.8.8\",\"@types/node\":\"^10.9.4\",\"fetch-mock\":\"7.7.3\",\"ignore-styles\":\"^5.0.1\",\"jasmine\":\"^3.2.0\",\"jasmine-class-mock\":\"^1.0.1\",\"jasmine-core\":\"^3.3.0\",\"karma\":\"^5.0.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^2.0.1\",\"karma-jasmine-html-reporter\":\"^1.4.0\",\"karma-requirejs\":\"^1.1.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-typescript\":\"^5.0.0\",\"karma-typescript-es6-transform\":\"^5.0.0\",\"nock\":\"^9.6.1\",\"requirejs\":\"^2.3.6\",\"ts-loader\":\"^5.0.0\",\"ts-node\":\"^7.0.1\",\"tslint\":\"^5.11.0\",\"tslint-no-focused-test\":\"^0.5.0\",\"typedoc\":\"^0.18.0\",\"typescript\":\"^3.9.7\",\"webpack\":\"^4.17.1\",\"webpack-cli\":\"^3.1.0\"}}");
|
|
18100
18099
|
|
|
18101
18100
|
/***/ }),
|
|
18102
18101
|
/* 225 */
|
|
@@ -32457,6 +32456,11 @@ class MessageHandler {
|
|
|
32457
32456
|
});
|
|
32458
32457
|
this.getMessagesOfType('SessionEndedMessage')
|
|
32459
32458
|
.subscribe(() => {
|
|
32459
|
+
const sessionEndedMessageReceived = {
|
|
32460
|
+
type: prom_1.PromMessageType.SessionEnded,
|
|
32461
|
+
value: { receivedOn: Date.now() }
|
|
32462
|
+
};
|
|
32463
|
+
this.internalMessages$.next({ faceMeMessageType: 'prom', promMsg: sessionEndedMessageReceived });
|
|
32460
32464
|
this.internalMessages$.next({ faceMeMessageType: 'sessionEnd' });
|
|
32461
32465
|
});
|
|
32462
32466
|
this.getMessagesOfType('AvatarRequestCompleted')
|
|
@@ -32502,6 +32506,7 @@ var PromMessageType;
|
|
|
32502
32506
|
PromMessageType[PromMessageType["AvailabilityCheck"] = 2] = "AvailabilityCheck";
|
|
32503
32507
|
PromMessageType[PromMessageType["QuestionMessageReceived"] = 3] = "QuestionMessageReceived";
|
|
32504
32508
|
PromMessageType[PromMessageType["AnswerMessageReceived"] = 4] = "AnswerMessageReceived";
|
|
32509
|
+
PromMessageType[PromMessageType["SessionEnded"] = 5] = "SessionEnded";
|
|
32505
32510
|
})(PromMessageType = exports.PromMessageType || (exports.PromMessageType = {}));
|
|
32506
32511
|
class Prom {
|
|
32507
32512
|
constructor(apiUrl) {
|
|
@@ -32519,9 +32524,9 @@ class Prom {
|
|
|
32519
32524
|
this.webRtcFrameHeight = this.registry.create('histogram', this.prom_prefix + 'webrtc_frame_height_px', 'A histogram of frame height in pixels', [60, 180, 240, 360, 540, 720, 1280]);
|
|
32520
32525
|
this.webRtcFrameWidth = this.registry.create('histogram', this.prom_prefix + 'webrtc_frame_width_px', 'A histogram of frame width in pixels', [60, 180, 240, 360, 540, 720, 1280, 1500, 1920]);
|
|
32521
32526
|
this.conversationRoundTripTime = this.registry.create('histogram', this.prom_prefix + 'conversation_rtt_duration_seconds', 'A histogram of round trip time of a conversation', [.001, 0.005, .01, .03, .05, .1, .2, .5, .75, 1.0, 1.5, 2, 2.5, 5, 7.5, 10]);
|
|
32522
|
-
setInterval(() => {
|
|
32527
|
+
this.metricsIntervalId = setInterval(() => {
|
|
32523
32528
|
this.sendMetrics();
|
|
32524
|
-
},
|
|
32529
|
+
}, 10000);
|
|
32525
32530
|
}
|
|
32526
32531
|
handleMessage(msg) {
|
|
32527
32532
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -32576,6 +32581,9 @@ class Prom {
|
|
|
32576
32581
|
case PromMessageType.AvailabilityCheck:
|
|
32577
32582
|
this.availabilityCheckTime.observe(msg.value, labels);
|
|
32578
32583
|
break;
|
|
32584
|
+
case PromMessageType.SessionEnded:
|
|
32585
|
+
this.stopSendingMetrics();
|
|
32586
|
+
break;
|
|
32579
32587
|
default:
|
|
32580
32588
|
break;
|
|
32581
32589
|
}
|
|
@@ -32604,6 +32612,11 @@ class Prom {
|
|
|
32604
32612
|
fetch(request);
|
|
32605
32613
|
this.registry.reset();
|
|
32606
32614
|
}
|
|
32615
|
+
stopSendingMetrics() {
|
|
32616
|
+
if (this.metricsIntervalId) {
|
|
32617
|
+
clearInterval(this.metricsIntervalId);
|
|
32618
|
+
}
|
|
32619
|
+
}
|
|
32607
32620
|
}
|
|
32608
32621
|
exports.Prom = Prom;
|
|
32609
32622
|
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -8,6 +8,9 @@ https://docs.uneeq.io/#/js_sdk
|
|
|
8
8
|
To use uneeq-js with a typescript version < 3.8, 'skipLibCheck' must be set to true.
|
|
9
9
|
|
|
10
10
|
## Release Notes
|
|
11
|
+
#### 2.40.2
|
|
12
|
+
* Minor tweak to client performance metricing
|
|
13
|
+
|
|
11
14
|
#### 2.40.1
|
|
12
15
|
* Fixed an issue that would sometimes cause a session to start with no video.
|
|
13
16
|
|