vani-meeting-client 1.4.9 → 1.5.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.
@@ -76,6 +76,7 @@ export declare class WebsocketHandler extends Base {
76
76
  private socketCheckTimeout?;
77
77
  private pingCheckTimeout?;
78
78
  private setUpTry;
79
+ private pongData;
79
80
  private lastPingTimeStamp;
80
81
  protected onObjectCreated(): void;
81
82
  cleanup(): void;
@@ -131,6 +131,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
131
131
  _this.connection = ConnectionType.new;
132
132
  _this.isSetUpDone = false;
133
133
  _this.setUpTry = 0;
134
+ _this.pongData = undefined;
134
135
  _this.lastPingTimeStamp = 0;
135
136
  return _this;
136
137
  }
@@ -387,6 +388,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
387
388
  var type = messagejson.type;
388
389
  var data = messagejson.data;
389
390
  if (type === WebSocketBasicEvents.Ping) {
391
+ this.pongData = data;
390
392
  this.sendSocketMessage(WebSocketBasicEvents.Pong, data);
391
393
  }
392
394
  else if (this.isVideoCallControllerMessageType(type)) {
@@ -481,7 +483,10 @@ var WebsocketHandler = /** @class */ (function (_super) {
481
483
  var _this = this;
482
484
  var _a, _b;
483
485
  if (this.isWebScoketConnected()) {
484
- if ((this.lastPingTimeStamp + (40 * 1000)) < new Date().getTime()) {
486
+ if (this.pongData) {
487
+ this.sendSocketMessage(WebSocketBasicEvents.Pong, this.pongData);
488
+ }
489
+ if ((this.lastPingTimeStamp + (80 * 1000)) < new Date().getTime()) {
485
490
  this.pingCheckTimeout = undefined;
486
491
  console.log("checkIfPingIsRunning", this.lastPingTimeStamp);
487
492
  //Discounted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "1.4.9",
3
+ "version": "1.5.0",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",