vani-meeting-client 2.2.6 → 2.2.7

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.
@@ -68,6 +68,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
68
68
  selfParticpant = this.communicationHandler.getSelfParticipant();
69
69
  console.log(selfParticpant);
70
70
  if (!(selfParticpant.userId !== participant.userId && !selfParticpant.getPeerConnections().has(participant.userId))) return [3 /*break*/, 2];
71
+ this.printLogIfRequired("Check if Can Send Offer");
71
72
  isOfferInitParticipant = this.isOfferInitParticipant(participant);
72
73
  if (!!isOfferInitParticipant) return [3 /*break*/, 2];
73
74
  peerConnectionObject = selfParticpant.getPeerConnectionsViaUserId(participant.userId, this.meetingStartRequest);
@@ -83,7 +84,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
83
84
  peerConnectionObject.offer = offer;
84
85
  peerConnectionObject.rtcPeerConnection = peerConnection;
85
86
  // send offer to peer
86
- console.log("offer", offer);
87
+ this.printLogIfRequired("Send Offer", offer);
87
88
  messageJson = { to: participant.userId, type: WebrtcMessageType.SendOffer, data: offer };
88
89
  this.sendWebrtcMessage(messageJson);
89
90
  _a.label = 2;
@@ -96,6 +97,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
96
97
  return __generator(this, function (_a) {
97
98
  switch (_a.label) {
98
99
  case 0:
100
+ this.printLogIfRequired("On New Offer", data);
99
101
  selfParticpant = this.communicationHandler.getSelfParticipant();
100
102
  participant = data.sender;
101
103
  peerConnectionObject = selfParticpant.getPeerConnectionsViaUserId(participant.userId, this.meetingStartRequest);
@@ -125,6 +127,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
125
127
  _this.onNewAnswer = function (data) { return __awaiter(_this, void 0, void 0, function () {
126
128
  var selfParticpant, participant, peerConnectionObject, peerConnection;
127
129
  return __generator(this, function (_a) {
130
+ this.printLogIfRequired("On New Answer", data);
128
131
  selfParticpant = this.communicationHandler.getSelfParticipant();
129
132
  participant = data.sender;
130
133
  peerConnectionObject = selfParticpant.getPeerConnectionsViaUserId(participant.userId, this.meetingStartRequest);
@@ -183,8 +186,10 @@ var WebrtcHandler = /** @class */ (function (_super) {
183
186
  _this.startSendTrackToPartiipant(remoteParticipant);
184
187
  }
185
188
  });
189
+ rtcConnection.addEventListener("");
186
190
  rtcConnection.addEventListener("track", function (onRemoteTrack) {
187
191
  var _a, _b;
192
+ _this.printLogIfRequired("On New Track Remote", onRemoteTrack);
188
193
  if (onRemoteTrack.streams && onRemoteTrack.streams.length > 0) {
189
194
  var mediaStream = onRemoteTrack.streams.at(0);
190
195
  if (mediaStream.getTracks() && mediaStream.getTracks().length > 0) {
@@ -220,8 +225,9 @@ var WebrtcHandler = /** @class */ (function (_super) {
220
225
  if (selfParticpant) {
221
226
  peerConnection = selfParticpant.getPeerConnectionsViaUserId(participant.userId, this.meetingStartRequest);
222
227
  if (peerConnection && peerConnection.rtcPeerConnection) {
223
- this.printLogIfRequired("Send Track");
228
+ this.printLogIfRequired("Send Track", participant);
224
229
  peerConnection.rtcPeerConnection.addTrack(track.track);
230
+ // peerConnection.rtcPeerConnection.addStream(new MediaStream([track.track]))
225
231
  }
226
232
  }
227
233
  return [2 /*return*/];
@@ -243,10 +249,10 @@ var WebrtcHandler = /** @class */ (function (_super) {
243
249
  optionalParams[_i - 1] = arguments[_i];
244
250
  }
245
251
  if (optionalParams && optionalParams.length > 0) {
246
- _this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(message, optionalParams);
252
+ _this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("Webrtc-" + message, optionalParams);
247
253
  }
248
254
  else {
249
- _this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log(message);
255
+ _this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("Webrtc-" + message);
250
256
  }
251
257
  };
252
258
  return _this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",