vani-meeting-client 0.4.8 → 0.4.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.
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import { VaniEvent, MessagePayload } from "..";
38
38
  import { Participant } from "../model/Participant";
39
39
  import * as log from 'loglevel';
40
- import { Track } from "../model/Track";
40
+ import { Track, TrackKind } from "../model/Track";
41
41
  import { WebSocketBasicEvents } from "../websocket-handler/WebsocketHandler";
42
42
  import { VaniEventListener } from "../utility/VaniEventListener";
43
43
  import { Utility } from "../utility/Utility";
@@ -195,6 +195,12 @@ var CommunicationHandler = /** @class */ (function () {
195
195
  CommunicationHandler.prototype.removeTrack = function (track, shouldInfromVideoController) {
196
196
  var _a;
197
197
  if (shouldInfromVideoController === void 0) { shouldInfromVideoController = true; }
198
+ if (track.trackKind === TrackKind.Audio) {
199
+ track.participant.isAudioEnable = false;
200
+ }
201
+ else if (track.trackKind === TrackKind.Video) {
202
+ track.participant.isVideoEnable = false;
203
+ }
198
204
  if (shouldInfromVideoController && this.isStartAndSetupWithServerCalled && track.isLocalTrack) {
199
205
  (_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.stopTrack(track);
200
206
  }
@@ -215,6 +221,12 @@ var CommunicationHandler = /** @class */ (function () {
215
221
  this.allTracks.push(track);
216
222
  }
217
223
  track.participant = participant;
224
+ if (track.trackKind === TrackKind.Audio) {
225
+ track.participant.isAudioEnable = true;
226
+ }
227
+ else if (track.trackKind === TrackKind.Video) {
228
+ track.participant.isVideoEnable = true;
229
+ }
218
230
  if (shouldInfromIfNotExist) {
219
231
  log.info("emitMessageToSource");
220
232
  this.emitMessageToSource(VaniEvent.OnTrack, track);
@@ -236,6 +248,12 @@ var CommunicationHandler = /** @class */ (function () {
236
248
  this.allTracks.push(track);
237
249
  this.selfTracks.push(track);
238
250
  }
251
+ if (track.trackKind === TrackKind.Audio) {
252
+ track.participant.isAudioEnable = true;
253
+ }
254
+ else if (track.trackKind === TrackKind.Video) {
255
+ track.participant.isVideoEnable = true;
256
+ }
239
257
  if (this.isStartAndSetupWithServerCalled) {
240
258
  (_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.sendTrack(track);
241
259
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",