vani-meeting-client 0.6.7 → 0.7.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.
@@ -61,7 +61,7 @@ var MeetingHandler = /** @class */ (function () {
61
61
  MeetingHandler.prototype.init = function () {
62
62
  var _a, _b, _c;
63
63
  return __awaiter(this, void 0, void 0, function () {
64
- var _d, _e;
64
+ var _d, _e, err_1;
65
65
  return __generator(this, function (_f) {
66
66
  switch (_f.label) {
67
67
  case 0:
@@ -79,15 +79,26 @@ var MeetingHandler = /** @class */ (function () {
79
79
  this.reactNativeWebrtcPlugin.registerGlobals();
80
80
  _f.label = 2;
81
81
  case 2:
82
+ _f.trys.push([2, 5, , 6]);
82
83
  if (!!this.videoCallHandler) return [3 /*break*/, 4];
83
84
  _e = this;
84
85
  return [4 /*yield*/, new DynamicLibHelper().getVideoCallClassHandler((_c = this.meetingStartRequest) === null || _c === void 0 ? void 0 : _c.meetingType, this.meetingStartRequest, this.communicationHandler)];
85
86
  case 3:
86
87
  _e.videoCallHandler = _f.sent();
87
88
  _f.label = 4;
88
- case 4:
89
- if (!this.websocketCallHandler) {
90
- this.websocketCallHandler = new WebsocketHandler(this.meetingStartRequest, this.communicationHandler);
89
+ case 4: return [3 /*break*/, 6];
90
+ case 5:
91
+ err_1 = _f.sent();
92
+ console.log("his.videoCallHandler error", err_1);
93
+ return [3 /*break*/, 6];
94
+ case 6:
95
+ try {
96
+ if (!this.websocketCallHandler) {
97
+ this.websocketCallHandler = new WebsocketHandler(this.meetingStartRequest, this.communicationHandler);
98
+ }
99
+ }
100
+ catch (err) {
101
+ console.log("his.websocketCallHandler error", err);
91
102
  }
92
103
  // this.handleGA();
93
104
  this.emitMessageToSource(VaniEvent.OnInitDone, {});
@@ -316,10 +327,9 @@ var MeetingHandler = /** @class */ (function () {
316
327
  return [];
317
328
  };
318
329
  MeetingHandler.prototype.isWebScoketConnected = function () {
319
- var _a, _b;
320
- console.log("Room Id", (_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.roomId);
330
+ var _a;
321
331
  if (this.websocketCallHandler) {
322
- return (_b = this.websocketCallHandler) === null || _b === void 0 ? void 0 : _b.isWebScoketConnected();
332
+ return (_a = this.websocketCallHandler) === null || _a === void 0 ? void 0 : _a.isWebScoketConnected();
323
333
  }
324
334
  return false;
325
335
  };
@@ -1,8 +1,9 @@
1
1
  import { MeetingStartRequest, MeetingType } from '..';
2
2
  import { CommunicationHandler } from '../inter-communication-handler/CommunicationHandler';
3
+ import { SFUHandler } from '../video-call-handler/SFUHandler';
3
4
  export declare class DynamicLibHelper {
4
5
  getReactNativeWebrtcPlugin(meetingStartRequest: MeetingStartRequest): Promise<any>;
5
- getVideoCallClassHandler(meetingType: MeetingType, meetingStartRequest: MeetingStartRequest, _communicationHandler: CommunicationHandler): Promise<import("../video-call-handler/SFUHandler").SFUHandler | import("../video-call-handler/WebrtcHandler").WebrtcHandler | undefined>;
6
+ getVideoCallClassHandler(meetingType: MeetingType, meetingStartRequest: MeetingStartRequest, _communicationHandler: CommunicationHandler): Promise<SFUHandler | import("../video-call-handler/WebrtcHandler").WebrtcHandler | undefined>;
6
7
  getMediaDevicesVariable(meetingStartRequest: MeetingStartRequest): any;
7
8
  getMediaStreamVariable(meetingStartRequest: MeetingStartRequest): any;
8
9
  }
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  };
37
37
  import { MeetingType } from '..';
38
38
  import * as log from 'loglevel';
39
+ import { SFUHandler } from '../video-call-handler/SFUHandler';
39
40
  var DynamicLibHelper = /** @class */ (function () {
40
41
  function DynamicLibHelper() {
41
42
  }
@@ -61,21 +62,18 @@ var DynamicLibHelper = /** @class */ (function () {
61
62
  return __generator(this, function (_a) {
62
63
  switch (_a.label) {
63
64
  case 0:
64
- if (!(meetingType === MeetingType.SFU)) return [3 /*break*/, 2];
65
- return [4 /*yield*/, import("../video-call-handler/SFUHandler")];
66
- case 1:
67
- baseVideoCallHandler = _a.sent();
68
- if (baseVideoCallHandler) {
69
- return [2 /*return*/, new baseVideoCallHandler.SFUHandler(meetingStartRequest, _communicationHandler)];
65
+ if (meetingType === MeetingType.SFU) {
66
+ baseVideoCallHandler = SFUHandler;
67
+ if (baseVideoCallHandler) {
68
+ return [2 /*return*/, new baseVideoCallHandler(meetingStartRequest, _communicationHandler)];
69
+ }
70
70
  }
71
- _a.label = 2;
72
- case 2:
73
- if (!(meetingType === MeetingType.WEBRTC)) return [3 /*break*/, 4];
71
+ if (!(meetingType === MeetingType.WEBRTC)) return [3 /*break*/, 2];
74
72
  baseVideoCallHandler = import("../video-call-handler/WebrtcHandler");
75
- if (!baseVideoCallHandler) return [3 /*break*/, 4];
73
+ if (!baseVideoCallHandler) return [3 /*break*/, 2];
76
74
  return [4 /*yield*/, baseVideoCallHandler];
77
- case 3: return [2 /*return*/, new (_a.sent()).WebrtcHandler(meetingStartRequest, _communicationHandler)];
78
- case 4: return [2 /*return*/, undefined];
75
+ case 1: return [2 /*return*/, new (_a.sent()).WebrtcHandler(meetingStartRequest, _communicationHandler)];
76
+ case 2: return [2 /*return*/, undefined];
79
77
  }
80
78
  });
81
79
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "0.6.7",
3
+ "version": "0.7.0",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",