vani-meeting-client 2.1.4 → 2.1.6

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.
@@ -26,6 +26,7 @@ export declare class CommunicationHandler {
26
26
  getEventEmitter(): VaniEventListener;
27
27
  onAudioVideoStatusUpdated(data: any): void;
28
28
  restartTransport: () => Promise<void>;
29
+ updateSelfParticipantUserId(): void;
29
30
  getSelfParticipant(): Participant | undefined;
30
31
  downloadParticipantsData(): void;
31
32
  onServerParticipants(data: any): void;
@@ -194,6 +194,15 @@ var CommunicationHandler = /** @class */ (function () {
194
194
  }
195
195
  }
196
196
  };
197
+ CommunicationHandler.prototype.updateSelfParticipantUserId = function () {
198
+ var participant = this.getSelfParticipant();
199
+ var userId;
200
+ try {
201
+ userId = participant.userId.split("-").at(0);
202
+ }
203
+ catch (err) { }
204
+ participant.userId = userId + "_" + new Date().getTime();
205
+ };
197
206
  CommunicationHandler.prototype.getSelfParticipant = function () {
198
207
  var _a;
199
208
  if (this.meetingStartRequest) {
@@ -33,6 +33,7 @@ export declare class MeetingStartRequest {
33
33
  wssUrl: string;
34
34
  minBitrateConfig: number;
35
35
  maxBitRateConfig: number;
36
+ renewUserIdOnEveryReconnection: boolean;
36
37
  maxAudioBitrateConfig: number;
37
38
  logLevel: LogLevel;
38
39
  dynamicWebSocketFetchBaseUrl?: string;
@@ -33,6 +33,7 @@ var MeetingStartRequest = /** @class */ (function () {
33
33
  this.shouldForceTurn = false;
34
34
  this.minBitrateConfig = 40000;
35
35
  this.maxBitRateConfig = 620000;
36
+ this.renewUserIdOnEveryReconnection = false;
36
37
  this.maxAudioBitrateConfig = -1;
37
38
  this.logLevel = LogLevel.None;
38
39
  this.isRecordingUser = false;
@@ -389,6 +389,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
389
389
  if (this.isWebScoketConnected() === false) {
390
390
  return;
391
391
  }
392
+ this.communicationHandler.updateSelfParticipantUserId();
392
393
  var participant = (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getSelfParticipant();
393
394
  participant.userData = (_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.userData;
394
395
  var config = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vani-meeting-client",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "Vani Meeting Clinet SDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",