vani-meeting-client-native 0.1.7 → 0.1.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.
- package/lib/inter-communication-handler/CommunicationHandler.d.ts +1 -0
- package/lib/inter-communication-handler/CommunicationHandler.js +13 -3
- package/lib/model/MeetingStartRequest.d.ts +1 -0
- package/lib/model/MeetingStartRequest.js +1 -0
- package/lib/websocket-handler/WebsocketHandler.js +1 -0
- package/package.json +1 -1
|
@@ -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) {
|
|
@@ -556,7 +565,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
556
565
|
this.internetReachbilityTimeout = window.setTimeout(this.checkIfInternetReachable, 200, 0);
|
|
557
566
|
};
|
|
558
567
|
CommunicationHandler.prototype.onApiResponded = function (count) {
|
|
559
|
-
var _a, _b, _c;
|
|
568
|
+
var _a, _b, _c, _d;
|
|
560
569
|
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onApiResponded", count);
|
|
561
570
|
if (this.isReachable === false) {
|
|
562
571
|
this.isReachable = true;
|
|
@@ -567,12 +576,13 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
567
576
|
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("onApiResponded inside", count);
|
|
568
577
|
if (this.meetingStartRequest && this.meetingStartRequest.isMobileApp) {
|
|
569
578
|
if ((_a = this.websocketCallHandler) === null || _a === void 0 ? void 0 : _a.isWebScoketConnected()) {
|
|
579
|
+
(_b = this.videoCallHandler) === null || _b === void 0 ? void 0 : _b.reconnectedWithoutPing();
|
|
570
580
|
return;
|
|
571
581
|
}
|
|
572
582
|
this.websocketCallHandler.reconnectOnInternetFailur();
|
|
573
583
|
}
|
|
574
|
-
else if ((
|
|
575
|
-
(
|
|
584
|
+
else if ((_c = this.websocketCallHandler) === null || _c === void 0 ? void 0 : _c.isWebScoketConnected()) {
|
|
585
|
+
(_d = this.videoCallHandler) === null || _d === void 0 ? void 0 : _d.reconnectedWithoutPing();
|
|
576
586
|
}
|
|
577
587
|
else {
|
|
578
588
|
this.websocketCallHandler.reconnectOnInternetFailur();
|
|
@@ -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 = {
|