vani-meeting-client-native 0.0.9 → 0.1.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.
@@ -77,9 +77,9 @@ var CommunicationHandler = /** @class */ (function () {
77
77
  (_a = _this.meetingHandler) === null || _a === void 0 ? void 0 : _a.endAndDestory();
78
78
  return;
79
79
  }
80
- if (count === 10) {
80
+ if (count === 20) {
81
81
  _this.emitMessageToSource(VaniEvent.OnNotReachable, {});
82
- if (_this.meetingStartRequest.isMobileApp) {
82
+ if (_this.meetingStartRequest && _this.meetingStartRequest.isMobileApp) {
83
83
  _this.emitMessageToSource(VaniEvent.OnSocketError, {});
84
84
  }
85
85
  }
@@ -256,7 +256,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
256
256
  if (url) {
257
257
  this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log.info("Connecting to ", url);
258
258
  this.isWebSocketConnectionInProgress = true;
259
- if ((_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.isMobileApp) {
259
+ if (this.meetingStartRequest && ((_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.isMobileApp)) {
260
260
  this.wss = new WebSocket(url + this.connection);
261
261
  }
262
262
  else {
@@ -277,7 +277,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
277
277
  this.wss.onerror = function (event) {
278
278
  var _a;
279
279
  _this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("wss error", event);
280
- if (_this.meetingStartRequest.isMobileApp) {
280
+ if (_this.meetingStartRequest && _this.meetingStartRequest.isMobileApp) {
281
281
  _this.communicationHandler.onIceCandidateDisconnected();
282
282
  }
283
283
  else {
@@ -325,7 +325,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
325
325
  (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.emitMessageToSource(VaniEvent.OnReconecting, {});
326
326
  this.wss.close(3005);
327
327
  this.wss = undefined;
328
- this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("this.wss undefined reconnectOnInternetFailur ");
328
+ this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("this.wss reconnectOnInternetFailur ");
329
329
  }
330
330
  this.connection = ConnectionType.reconnect;
331
331
  this.connect(true);
@@ -346,6 +346,9 @@ var WebsocketHandler = /** @class */ (function (_super) {
346
346
  var _a;
347
347
  this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log.info("onWebSocketClosed", event.code);
348
348
  if (event.code === 3005 || event.wasClean === false || (event.message && event.message.toLowerCase().includes("software") && event.message.toLowerCase().includes("abort")) || (event.message && event.message.toLowerCase().includes("no address"))) {
349
+ if (this.isWebSocketConnectionInProgress) {
350
+ return;
351
+ }
349
352
  this.socketCheckTimeout = window.setTimeout(function () {
350
353
  var _a;
351
354
  _this.tryToReconectSocket();
@@ -358,6 +361,9 @@ var WebsocketHandler = /** @class */ (function (_super) {
358
361
  };
359
362
  WebsocketHandler.prototype.tryToReconectSocket = function () {
360
363
  var _a, _b;
364
+ if (this.isWebSocketConnectionInProgress) {
365
+ return;
366
+ }
361
367
  this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log.info("tryToReconectSocket");
362
368
  if (this.isWebScoketConnected() === false && this.isEnded === false) {
363
369
  this.wss = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client-native",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",