vani-meeting-client 0.2.0 → 0.2.1
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.
|
@@ -74,7 +74,6 @@ export declare class WebsocketHandler extends Base {
|
|
|
74
74
|
isWebScoketConnected(): boolean;
|
|
75
75
|
sendSocketMessage(type: WebSocketEvents, data: any): void;
|
|
76
76
|
reconnectOnInternetFailur(): void;
|
|
77
|
-
private checkIfSocketConnected;
|
|
78
77
|
private onWebSocketClosed;
|
|
79
78
|
private tryToReconectSocket;
|
|
80
79
|
private onSocketConnected;
|
|
@@ -216,7 +216,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
216
216
|
this.wss = new WebSocket(url + this.connection);
|
|
217
217
|
}
|
|
218
218
|
this.wss.onopen = function (event) {
|
|
219
|
-
|
|
219
|
+
// this.checkIfSocketConnected();
|
|
220
220
|
log.info("connected ----");
|
|
221
221
|
_this.isWebSocketConnectionInProgress = false;
|
|
222
222
|
_this.isSetUpDone = false;
|
|
@@ -265,6 +265,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
265
265
|
};
|
|
266
266
|
WebsocketHandler.prototype.reconnectOnInternetFailur = function () {
|
|
267
267
|
var _a;
|
|
268
|
+
log.info("reconnectOnInternetFailur");
|
|
268
269
|
if (this.wss) {
|
|
269
270
|
(_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.emitMessageToSource(VaniEvent.OnReconecting, {});
|
|
270
271
|
this.wss.close(3005);
|
|
@@ -273,18 +274,17 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
273
274
|
this.connect(true);
|
|
274
275
|
}
|
|
275
276
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
};
|
|
277
|
+
// private checkIfSocketConnected() {
|
|
278
|
+
// window.setTimeout(() => {
|
|
279
|
+
// if (this.isWebScoketConnected()) {
|
|
280
|
+
// log.info("Connected")
|
|
281
|
+
// this.checkIfSocketConnected();
|
|
282
|
+
// }
|
|
283
|
+
// else {
|
|
284
|
+
// log.info("Not Connected")
|
|
285
|
+
// }
|
|
286
|
+
// }, 1000);
|
|
287
|
+
// }
|
|
288
288
|
WebsocketHandler.prototype.onWebSocketClosed = function (event) {
|
|
289
289
|
var _this = this;
|
|
290
290
|
log.info("onWebSocketClosed");
|
|
@@ -425,6 +425,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
425
425
|
WebsocketHandler.prototype.checkIfPingIsRunning = function () {
|
|
426
426
|
var _this = this;
|
|
427
427
|
var _a;
|
|
428
|
+
console.log("checkIfPingIsRunning");
|
|
428
429
|
if (this.isWebScoketConnected()) {
|
|
429
430
|
if ((this.lastPingTimeStamp + (40 * 1000)) < new Date().getTime()) {
|
|
430
431
|
this.pingCheckTimeout = undefined;
|
|
@@ -434,7 +435,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
434
435
|
else {
|
|
435
436
|
this.pingCheckTimeout = window.setTimeout(function () {
|
|
436
437
|
_this.checkIfPingIsRunning();
|
|
437
|
-
},
|
|
438
|
+
}, 5 * 1000);
|
|
438
439
|
}
|
|
439
440
|
}
|
|
440
441
|
};
|