vani-meeting-client 2.3.3 → 2.3.4

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.
package/lib/.DS_Store ADDED
Binary file
@@ -226,7 +226,7 @@ var CommunicationHandler = /** @class */ (function () {
226
226
  videoCallHandler = _b.sent();
227
227
  if (videoCallHandler) {
228
228
  this.setVideoCallHandler(videoCallHandler);
229
- videoCallHandler.init();
229
+ videoCallHandler.init(true);
230
230
  }
231
231
  return [2 /*return*/];
232
232
  }
@@ -5,7 +5,7 @@ import { Base } from "../base/Base";
5
5
  import { TrackStats } from "../model/TrackStats";
6
6
  export declare abstract class BaseVideoCallHandler extends Base {
7
7
  protected onObjectCreated(): void;
8
- abstract init(): Promise<void>;
8
+ init(isForceFully?: boolean): Promise<void>;
9
9
  abstract onReconnect(): Promise<void>;
10
10
  abstract onSocketMessage(websocketCallHandler: WebSocketMessageBody): void;
11
11
  abstract stopTrack(track: Track): void;
@@ -68,6 +68,15 @@ var BaseVideoCallHandler = /** @class */ (function (_super) {
68
68
  _super.prototype.onObjectCreated.call(this);
69
69
  (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.setVideoCallHandler(this);
70
70
  };
71
+ BaseVideoCallHandler.prototype.init = function (isForceFully) {
72
+ if (isForceFully === void 0) { isForceFully = false; }
73
+ return __awaiter(this, void 0, void 0, function () {
74
+ return __generator(this, function (_a) {
75
+ return [2 /*return*/, undefined];
76
+ });
77
+ });
78
+ };
79
+ ;
71
80
  BaseVideoCallHandler.prototype.onAllParticipants = function (participants) {
72
81
  return __awaiter(this, void 0, void 0, function () {
73
82
  return __generator(this, function (_a) {
@@ -17,6 +17,7 @@ export declare class SFUHandler extends BaseVideoCallHandler {
17
17
  private consumers;
18
18
  private dataProducers;
19
19
  private dataConsumer;
20
+ private isInitDone;
20
21
  constructor(_meetingStartRequest: MeetingStartRequest, _communicationHandler: CommunicationHandler);
21
22
  getDevice: () => Device;
22
23
  reconnectedWithoutPing(): void;
@@ -35,7 +36,7 @@ export declare class SFUHandler extends BaseVideoCallHandler {
35
36
  createDataChannel(): Promise<void>;
36
37
  onParticipantUpdated(): void;
37
38
  sendMessageViaDataChannel(messagePayload: any): void;
38
- init(): Promise<void>;
39
+ init(isForceFully?: boolean): Promise<void>;
39
40
  private onTransportNotFound;
40
41
  restartTransport(): void;
41
42
  private addObserverForDevice;
@@ -88,6 +88,7 @@ var SFUHandler = /** @class */ (function (_super) {
88
88
  _this.consumers = [];
89
89
  _this.dataProducers = [];
90
90
  _this.dataConsumer = [];
91
+ _this.isInitDone = false;
91
92
  _this.getDevice = function () {
92
93
  if (_this.device) {
93
94
  return _this.device;
@@ -546,10 +547,15 @@ var SFUHandler = /** @class */ (function (_super) {
546
547
  this.dataProducers[0].send(JSON.stringify(messagePayload));
547
548
  }
548
549
  };
549
- SFUHandler.prototype.init = function () {
550
+ SFUHandler.prototype.init = function (isForceFully) {
551
+ if (isForceFully === void 0) { isForceFully = false; }
550
552
  return __awaiter(this, void 0, void 0, function () {
551
553
  var messageJson;
552
554
  return __generator(this, function (_a) {
555
+ if (this.isInitDone && isForceFully === false) {
556
+ return [2 /*return*/];
557
+ }
558
+ this.isInitDone = true;
553
559
  this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("SFU Init");
554
560
  messageJson = { to: "self", type: SFUMessageType.GetRouterRtpCapabilities, message: SFUMessageType.GetRouterRtpCapabilities };
555
561
  this.sendSFUMessageToSocket(messageJson);
@@ -46,7 +46,7 @@ export declare class WebrtcHandler extends BaseVideoCallHandler {
46
46
  startSendTrackToPartiipant: (participant: Participant) => Promise<void>;
47
47
  sendTrackToParticipant: (track: Track, participant: Participant) => Promise<void>;
48
48
  private sendWebrtcMessage;
49
- init(): Promise<void>;
49
+ init(isForceFully?: boolean): Promise<void>;
50
50
  onReconnect(): Promise<void>;
51
51
  stopTrack(track: Track): void;
52
52
  pauseTrack(track: Track): void;
@@ -991,8 +991,9 @@ var WebrtcHandler = /** @class */ (function (_super) {
991
991
  });
992
992
  });
993
993
  };
994
- WebrtcHandler.prototype.init = function () {
994
+ WebrtcHandler.prototype.init = function (isForceFully) {
995
995
  var _a;
996
+ if (isForceFully === void 0) { isForceFully = false; }
996
997
  return __awaiter(this, void 0, void 0, function () {
997
998
  var _this = this;
998
999
  return __generator(this, function (_b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",