vani-meeting-client 0.9.0 → 0.9.2

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.
@@ -4,6 +4,10 @@ export declare enum MeetingType {
4
4
  WEBRTC = "webrtc",
5
5
  SFU = "SFU"
6
6
  }
7
+ export declare enum ConnectionProtocol {
8
+ TCP = "TCP",
9
+ UDP = "UDP"
10
+ }
7
11
  export declare enum CameraFacingMode {
8
12
  Front = "user",
9
13
  Back = "environment"
@@ -39,6 +43,7 @@ export declare class MeetingStartRequest {
39
43
  simulcastEncodings: RTCRtpEncodingParameters[];
40
44
  isDataChannelRequired: boolean;
41
45
  shouldPauseUploadingStreamOnSingleParticipant: boolean;
46
+ connectionProtocol: ConnectionProtocol;
42
47
  urlToCheckInternetPresent: string;
43
48
  constructor(_roomId: string, _userId: string, _appId: string, _wssUrl: string);
44
49
  }
@@ -4,6 +4,11 @@ export var MeetingType;
4
4
  MeetingType["WEBRTC"] = "webrtc";
5
5
  MeetingType["SFU"] = "SFU";
6
6
  })(MeetingType || (MeetingType = {}));
7
+ export var ConnectionProtocol;
8
+ (function (ConnectionProtocol) {
9
+ ConnectionProtocol["TCP"] = "TCP";
10
+ ConnectionProtocol["UDP"] = "UDP";
11
+ })(ConnectionProtocol || (ConnectionProtocol = {}));
7
12
  export var CameraFacingMode;
8
13
  (function (CameraFacingMode) {
9
14
  CameraFacingMode["Front"] = "user";
@@ -34,6 +39,7 @@ var MeetingStartRequest = /** @class */ (function () {
34
39
  this.simulcastEncodings = [{ maxBitrate: 40000, scaleResolutionDownBy: 2.0 }, { maxBitrate: 620000, scaleResolutionDownBy: 1.0 },];
35
40
  this.isDataChannelRequired = false;
36
41
  this.shouldPauseUploadingStreamOnSingleParticipant = true;
42
+ this.connectionProtocol = ConnectionProtocol.UDP;
37
43
  this.urlToCheckInternetPresent = "https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=Stack%20Overflow";
38
44
  this.roomId = _roomId;
39
45
  this.userId = _userId;
@@ -337,18 +337,19 @@ var WebsocketHandler = /** @class */ (function (_super) {
337
337
  this.socketSubscribeToTopic();
338
338
  };
339
339
  WebsocketHandler.prototype.socketSubscribeToTopic = function () {
340
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
340
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
341
341
  if (this.isWebScoketConnected() === false) {
342
342
  return;
343
343
  }
344
344
  var config = {
345
- participant: (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getSelfParticipant(), apiData: (_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.apiData,
346
- appId: (_c = this.meetingStartRequest) === null || _c === void 0 ? void 0 : _c.appId, sfuRequired: (((_d = this.meetingStartRequest) === null || _d === void 0 ? void 0 : _d.meetingType) === MeetingType.SFU), numberOfUsers: (_e = this.meetingStartRequest) === null || _e === void 0 ? void 0 : _e.numberOfUsers, meetId: (_f = this.meetingStartRequest) === null || _f === void 0 ? void 0 : _f.roomId
345
+ connectionProtocol: (_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.connectionProtocol,
346
+ participant: (_b = this.communicationHandler) === null || _b === void 0 ? void 0 : _b.getSelfParticipant(), apiData: (_c = this.meetingStartRequest) === null || _c === void 0 ? void 0 : _c.apiData,
347
+ appId: (_d = this.meetingStartRequest) === null || _d === void 0 ? void 0 : _d.appId, sfuRequired: (((_e = this.meetingStartRequest) === null || _e === void 0 ? void 0 : _e.meetingType) === MeetingType.SFU), numberOfUsers: (_f = this.meetingStartRequest) === null || _f === void 0 ? void 0 : _f.numberOfUsers, meetId: (_g = this.meetingStartRequest) === null || _g === void 0 ? void 0 : _g.roomId
347
348
  };
348
349
  this.sendSocketMessage(WebSocketBasicEvents.Config, config);
349
- var hostNotificationRoom = { roomId: (_g = this.meetingStartRequest) === null || _g === void 0 ? void 0 : _g.userId, id: (_h = this.meetingStartRequest) === null || _h === void 0 ? void 0 : _h.userId };
350
+ var hostNotificationRoom = { roomId: (_h = this.meetingStartRequest) === null || _h === void 0 ? void 0 : _h.userId, id: (_j = this.meetingStartRequest) === null || _j === void 0 ? void 0 : _j.userId };
350
351
  this.sendSocketMessage(WebSocketBasicEvents.JoinRoom, hostNotificationRoom);
351
- var roomForAllClient = { roomId: (_j = this.meetingStartRequest) === null || _j === void 0 ? void 0 : _j.roomId, id: (_k = this.meetingStartRequest) === null || _k === void 0 ? void 0 : _k.userId };
352
+ var roomForAllClient = { roomId: (_k = this.meetingStartRequest) === null || _k === void 0 ? void 0 : _k.roomId, id: (_l = this.meetingStartRequest) === null || _l === void 0 ? void 0 : _l.userId };
352
353
  this.sendSocketMessage(WebSocketBasicEvents.JoinRoom, roomForAllClient);
353
354
  this.setUpTry = 0;
354
355
  this.askIfSetupDone();
@@ -382,7 +383,10 @@ var WebsocketHandler = /** @class */ (function (_super) {
382
383
  if (type === WebSocketBasicEvents.Ping) {
383
384
  this.sendSocketMessage(WebSocketBasicEvents.Pong, data);
384
385
  }
385
- else if (this.isVideoCallControllerMessageType(type)) {
386
+ else {
387
+ console.log(messagejson);
388
+ }
389
+ if (this.isVideoCallControllerMessageType(type)) {
386
390
  (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.onVideoCallWebSocketMessage(messagejson);
387
391
  return;
388
392
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",