vani-meeting-client 2.2.3-beta → 2.2.3-beta1

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.
@@ -483,7 +483,6 @@ var MeetingHandler = /** @class */ (function () {
483
483
  MeetingHandler.prototype.checkSocket = function () {
484
484
  return __awaiter(this, void 0, void 0, function () {
485
485
  return __generator(this, function (_a) {
486
- debugger;
487
486
  if (!this.meetingStartRequest) {
488
487
  log.error("meetingStartRequestObject not found");
489
488
  return [2 /*return*/, false];
@@ -13,6 +13,7 @@ export declare class Participant {
13
13
  isAudioEnable: boolean;
14
14
  isStartMeetingCalled: boolean;
15
15
  isRecordingUser: boolean;
16
- peerConnections: Map<string, PeerConnection>;
16
+ private peerConnections;
17
+ getPeerConnections: () => Map<string, PeerConnection>;
17
18
  constructor(_userId: string, _roomId: string, _userData?: any, _isAdmin?: boolean);
18
19
  }
@@ -2,6 +2,7 @@ var Participant = /** @class */ (function () {
2
2
  function Participant(_userId, _roomId, _userData, _isAdmin) {
3
3
  if (_userData === void 0) { _userData = {}; }
4
4
  if (_isAdmin === void 0) { _isAdmin = false; }
5
+ var _this = this;
5
6
  this.isAdmin = false;
6
7
  this.isAudioBlockedByAdmin = false;
7
8
  this.isVideoBlockedByAdmin = false;
@@ -13,6 +14,12 @@ var Participant = /** @class */ (function () {
13
14
  this.isStartMeetingCalled = false;
14
15
  this.isRecordingUser = false;
15
16
  this.peerConnections = new Map();
17
+ this.getPeerConnections = function () {
18
+ if (!_this.peerConnections) {
19
+ _this.peerConnections = new Map();
20
+ }
21
+ return _this.peerConnections;
22
+ };
16
23
  this.userId = _userId;
17
24
  this.roomId = _roomId;
18
25
  this.userData = _userData;
@@ -99,14 +99,16 @@ var WebrtcHandler = /** @class */ (function (_super) {
99
99
  switch (_a.label) {
100
100
  case 0:
101
101
  selfParticpant = this.communicationHandler.getSelfParticipant();
102
- if (!(selfParticpant.userId !== participant.userId && !selfParticpant.peerConnections.has(participant.userId))) return [3 /*break*/, 2];
102
+ console.log(selfParticpant);
103
+ debugger;
104
+ if (!(selfParticpant.userId !== participant.userId && !selfParticpant.getPeerConnections().has(participant.userId))) return [3 /*break*/, 2];
103
105
  console.log("onUserJoined ", participant);
104
106
  isOfferInitParticipant = this.isOfferInitParticipant(participant);
105
107
  if (!!isOfferInitParticipant) return [3 /*break*/, 2];
106
- if (!selfParticpant.peerConnections.has(participant.userId)) {
107
- selfParticpant.peerConnections.set(participant.userId, new PeerConnection());
108
+ if (!selfParticpant.getPeerConnections().has(participant.userId)) {
109
+ selfParticpant.getPeerConnections().set(participant.userId, new PeerConnection());
108
110
  }
109
- peerConnectionObject = selfParticpant.peerConnections.get(participant.userId);
111
+ peerConnectionObject = selfParticpant.getPeerConnections().get(participant.userId);
110
112
  peerConnection = this.dynamicLibHelper.getRTCPeerConnection(this.meetingStartRequest);
111
113
  if (!peerConnection) return [3 /*break*/, 2];
112
114
  peerConnection.addTransceiver("audio", { direction: "sendrecv" });
@@ -278,7 +278,6 @@ var WebsocketHandler = /** @class */ (function (_super) {
278
278
  if (!url_1.includes("connection=")) {
279
279
  url_1 = url_1 + "/?connection=";
280
280
  }
281
- debugger;
282
281
  if (url_1) {
283
282
  this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && log.info("Connecting to ", url_1);
284
283
  this.isWebSocketConnectionInProgress = true;
@@ -322,7 +321,6 @@ var WebsocketHandler = /** @class */ (function (_super) {
322
321
  }
323
322
  };
324
323
  this.wss.onclose = function (event) {
325
- debugger;
326
324
  _this.isSetUpDone = false;
327
325
  _this.isWebSocketConnectionInProgress = false;
328
326
  _this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && ("WebSocket is closed now.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "2.2.3beta",
3
+ "version": "2.2.3beta1",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",