vani-meeting-client 2.0.7 → 2.0.9

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,10 +15,10 @@ export declare class MeetingHandler {
15
15
  meetingStartRequestObject(roomId: string, userId: string, appId: string, wssUrl: string, shouldIgnoreCaseForRoomId?: boolean): MeetingStartRequest;
16
16
  endAndDestory(): void;
17
17
  requestToCloseTheRoom: () => void;
18
- init(): Promise<void>;
18
+ init(): Promise<boolean>;
19
19
  recreateVideoCallHandler: () => Promise<BaseVideoCallHandler>;
20
20
  switchCamera(): void;
21
- startLocalStream(isVideoRequired: boolean, isAudioRequired: boolean, shouldAddTrackImmediately?: boolean, userMediaPayload?: any): Promise<void>;
21
+ startLocalStream(isVideoRequired: boolean, isAudioRequired: boolean, shouldAddTrackImmediately?: boolean, userMediaPayload?: any): Promise<boolean>;
22
22
  startScreenShare(isAudioRequired?: boolean, shouldAddTrackImmediately?: boolean, screensharePayload?: any): Promise<void>;
23
23
  stopScreenSharing(): Promise<void>;
24
24
  getDevices(deviceType: GetDevicesType): Promise<Device[] | undefined>;
@@ -48,9 +48,9 @@ export declare class MeetingHandler {
48
48
  sendMessage(message: MessagePayload): TaskResponse;
49
49
  getOldMessages(): Promise<void>;
50
50
  onOldMessages(data: any): Promise<void>;
51
- checkSocket(): Promise<void>;
51
+ checkSocket(): Promise<boolean>;
52
52
  startMeeting(): Promise<void>;
53
- getMeetingStartTime(): Promise<void>;
53
+ getMeetingStartTime(): Promise<boolean>;
54
54
  startRTMPStream(urls: string[]): Promise<void>;
55
55
  getEventEmitter(): VaniEventListener | undefined;
56
56
  restartTransport: () => Promise<void>;
@@ -123,7 +123,7 @@ var MeetingHandler = /** @class */ (function () {
123
123
  case 0:
124
124
  if (!this.meetingStartRequest) {
125
125
  log.error("meetingStartRequestObject not found");
126
- return [2 /*return*/];
126
+ return [2 /*return*/, false];
127
127
  }
128
128
  log.setLevel("trace");
129
129
  (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.setMeetingStartRequest(this.meetingStartRequest);
@@ -147,7 +147,7 @@ var MeetingHandler = /** @class */ (function () {
147
147
  }
148
148
  // this.handleGA();
149
149
  this.emitMessageToSource(VaniEvent.OnInitDone, {});
150
- return [2 /*return*/];
150
+ return [2 /*return*/, true];
151
151
  }
152
152
  });
153
153
  });
@@ -163,7 +163,7 @@ var MeetingHandler = /** @class */ (function () {
163
163
  return __generator(this, function (_c) {
164
164
  if (!this.meetingStartRequest) {
165
165
  log.error("meetingStartRequestObject not found");
166
- return [2 /*return*/];
166
+ return [2 /*return*/, false];
167
167
  }
168
168
  if ((((_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.isMobileApp) && !this.reactNativeWebrtcPlugin) || ((_b = this.communicationHandler) === null || _b === void 0 ? void 0 : _b.isReady()) === false) {
169
169
  log.error("Init method not called");
@@ -176,7 +176,7 @@ var MeetingHandler = /** @class */ (function () {
176
176
  return [2 /*return*/];
177
177
  }
178
178
  this.userMediaHandler.startLocalStream(isVideoRequired, isAudioRequired, shouldAddTrackImmediately, userMediaPayload);
179
- return [2 /*return*/];
179
+ return [2 /*return*/, true];
180
180
  });
181
181
  });
182
182
  };
@@ -452,15 +452,15 @@ var MeetingHandler = /** @class */ (function () {
452
452
  return __generator(this, function (_a) {
453
453
  if (!this.meetingStartRequest) {
454
454
  log.error("meetingStartRequestObject not found");
455
- return [2 /*return*/];
455
+ return [2 /*return*/, false];
456
456
  }
457
457
  if (!this.websocketCallHandler) {
458
458
  log.error("Init method not called");
459
- return [2 /*return*/];
459
+ return [2 /*return*/, false];
460
460
  }
461
461
  this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log.info("checkSocket");
462
462
  this.websocketCallHandler.startSocketConnection();
463
- return [2 /*return*/];
463
+ return [2 /*return*/, true];
464
464
  });
465
465
  });
466
466
  };
@@ -480,15 +480,15 @@ var MeetingHandler = /** @class */ (function () {
480
480
  return __generator(this, function (_c) {
481
481
  if (!this.meetingStartRequest) {
482
482
  log.error("meetingStartRequestObject not found");
483
- return [2 /*return*/];
483
+ return [2 /*return*/, false];
484
484
  }
485
485
  if (!this.websocketCallHandler) {
486
486
  log.error("Init method not called");
487
- return [2 /*return*/];
487
+ return [2 /*return*/, false];
488
488
  }
489
489
  meetingStartTimeObject = { type: WebSocketBasicEvents.GetMeetingStartTime, to: (_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.userId };
490
490
  (_b = this.websocketCallHandler) === null || _b === void 0 ? void 0 : _b.sendSocketMessage(WebSocketBasicEvents.GetMeetingStartTime, meetingStartTimeObject);
491
- return [2 /*return*/];
491
+ return [2 /*return*/, true];
492
492
  });
493
493
  });
494
494
  };
@@ -168,11 +168,11 @@ var UserMediaHandler = /** @class */ (function (_super) {
168
168
  var _this = this;
169
169
  return __generator(this, function (_a) {
170
170
  if (!this.meetingStartRequest) {
171
- log.warn("meetingStartRequest not found");
171
+ log.log("meetingStartRequest not found");
172
172
  return [2 /*return*/];
173
173
  }
174
174
  if (this.isScreenShareFetchInProgress) {
175
- log.warn("Already fetching stream. So request ignored");
175
+ log.log("Already fetching stream. So request ignored");
176
176
  return [2 /*return*/];
177
177
  }
178
178
  if (!screensharePayload) {
@@ -209,7 +209,7 @@ var UserMediaHandler = /** @class */ (function (_super) {
209
209
  }
210
210
  this.userMediaPayload = userMediaPayload;
211
211
  if (this.isVideoAudioFetchInProgress) {
212
- log.warn("Already fetching stream. So request ignored");
212
+ log.log("Already fetching stream. So request ignored");
213
213
  return [2 /*return*/];
214
214
  }
215
215
  if (!isVideoRequired) return [3 /*break*/, 2];
@@ -324,7 +324,7 @@ var UserMediaHandler = /** @class */ (function (_super) {
324
324
  };
325
325
  UserMediaHandler.prototype.onStreamError = function (error, isAudioRequired, isVideoRequired) {
326
326
  var _a;
327
- log.warn(error.message);
327
+ log.log(error.message);
328
328
  (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.emitMessageToSource(VaniEvent.OnPermissionError, error);
329
329
  if (isAudioRequired && this.muteUmutePromiseResolver) {
330
330
  this.muteUmutePromiseResolver({ message: "Permission Declined", error: 'PermissionDenied', isSuccess: false });
@@ -192,7 +192,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
192
192
  var _this = this;
193
193
  return __generator(this, function (_a) {
194
194
  if (!this.meetingStartRequest) {
195
- log.warn("meetingStartRequest not found on startSocketConnection");
195
+ log.log("meetingStartRequest not found on startSocketConnection");
196
196
  return [2 /*return*/];
197
197
  }
198
198
  if (this.meetingStartRequest.dynamicWebSocketFetchBaseUrl) {
@@ -218,7 +218,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
218
218
  })
219
219
  .catch(function (error) {
220
220
  _this.connect(false);
221
- log.warn(error);
221
+ // log.warn(error)
222
222
  _this.connect(false);
223
223
  });
224
224
  }
@@ -280,7 +280,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
280
280
  this.wss.onclose = function (event) {
281
281
  _this.isWebSocketConnectionInProgress = false;
282
282
  _this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && ("WebSocket is closed now.");
283
- log.warn(event);
283
+ // log.warn(event)
284
284
  _this.onWebSocketClosed(event);
285
285
  };
286
286
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",