vani-meeting-client-native 0.2.2 → 0.2.4

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.
@@ -15,6 +15,7 @@ export declare class MeetingHandler {
15
15
  meetingStartRequestObject(roomId: string, userId: string, appId: string, wssUrl: string, shouldIgnoreCaseForRoomId?: boolean): MeetingStartRequest;
16
16
  endAndDestory(): void;
17
17
  cleanupWebsocket: () => void;
18
+ isWebSocketInPreConnect: () => boolean;
18
19
  requestToCloseTheRoom: () => void;
19
20
  preconnect: (url: string) => Promise<void>;
20
21
  init(): Promise<boolean>;
@@ -55,6 +55,13 @@ var MeetingHandler = /** @class */ (function () {
55
55
  catch (err) {
56
56
  }
57
57
  };
58
+ this.isWebSocketInPreConnect = function () {
59
+ var _a;
60
+ if (_this.websocketCallHandler) {
61
+ return (_a = _this.websocketCallHandler) === null || _a === void 0 ? void 0 : _a.isWebSocketInPreConnect();
62
+ }
63
+ return false;
64
+ };
58
65
  this.requestToCloseTheRoom = function () {
59
66
  var _a;
60
67
  (_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.requestToCloseTheRoom();
@@ -96,6 +96,7 @@ export declare class WebsocketHandler extends Base {
96
96
  cleanup(): Promise<void>;
97
97
  startSocketConnection(isForPreConnect?: boolean, url?: string): Promise<void>;
98
98
  private connect;
99
+ isWebSocketInPreConnect(): boolean;
99
100
  isWebScoketConnectedWithoutSetup(): boolean;
100
101
  isWebScoketConnected(): boolean;
101
102
  sendSocketMessage(type: WebSocketEvents, data: any): void;
@@ -293,6 +293,9 @@ var WebsocketHandler = /** @class */ (function (_super) {
293
293
  if (!isForPreConnect) {
294
294
  _this.onSocketConnected();
295
295
  }
296
+ else {
297
+ console.log("WebSocket connected in pre connect");
298
+ }
296
299
  };
297
300
  this.wss.onmessage = function (event) {
298
301
  _this.isWebSocketConnectionInProgress = false;
@@ -332,6 +335,12 @@ var WebsocketHandler = /** @class */ (function (_super) {
332
335
  });
333
336
  });
334
337
  };
338
+ WebsocketHandler.prototype.isWebSocketInPreConnect = function () {
339
+ if (this.wss && this.wss.readyState === 1 && !this.isSetUpDone) {
340
+ return true;
341
+ }
342
+ return false;
343
+ };
335
344
  WebsocketHandler.prototype.isWebScoketConnectedWithoutSetup = function () {
336
345
  var _a;
337
346
  if (this.wss && this.wss.readyState === 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client-native",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/lib/.DS_Store DELETED
Binary file