vani-meeting-client 1.1.0 → 1.1.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.
|
@@ -131,7 +131,7 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
131
131
|
return this.allParticipants.find(function (participant) { return participant.userId === userId; });
|
|
132
132
|
};
|
|
133
133
|
CommunicationHandler.prototype.addParticipantIfNotExist = function (participant, shouldInfrom) {
|
|
134
|
-
var _a;
|
|
134
|
+
var _a, _b, _c;
|
|
135
135
|
if (shouldInfrom === void 0) { shouldInfrom = false; }
|
|
136
136
|
console.log("addParticipantIfNotExist", this.allParticipants);
|
|
137
137
|
console.log("addParticipantIfNotExist new user", participant);
|
|
@@ -145,16 +145,22 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
145
145
|
this.emitMessageToSource(VaniEvent.OnParticipantDataUpdated, oldParticipant);
|
|
146
146
|
}
|
|
147
147
|
this.updateParticipantAudioVideoDataAccordingToTrack(oldParticipant);
|
|
148
|
+
if (oldParticipant.userId === ((_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.userId)) {
|
|
149
|
+
this.meetingStartRequest.userData = oldParticipant.userData;
|
|
150
|
+
}
|
|
148
151
|
return oldParticipant;
|
|
149
152
|
}
|
|
150
153
|
else {
|
|
151
154
|
participant = Object.assign(new Participant(participant.userId, participant.roomId, participant.userData, participant.isAdmin), participant);
|
|
152
155
|
this.updateParticipantAudioVideoDataAccordingToTrack(participant);
|
|
156
|
+
if (participant.userId === ((_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.userId)) {
|
|
157
|
+
this.meetingStartRequest.userData = participant.userData;
|
|
158
|
+
}
|
|
153
159
|
this.allParticipants.push(participant);
|
|
154
160
|
if (shouldInfrom) {
|
|
155
161
|
this.emitMessageToSource(VaniEvent.OnUserJoined, participant);
|
|
156
162
|
}
|
|
157
|
-
(
|
|
163
|
+
(_c = this.videoCallHandler) === null || _c === void 0 ? void 0 : _c.onParticipantUpdated();
|
|
158
164
|
return participant;
|
|
159
165
|
}
|
|
160
166
|
};
|
|
@@ -312,7 +312,9 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
312
312
|
log.info("onWebSocketClosed", event.code);
|
|
313
313
|
if (event.wasClean === false || (event.message && event.message.toLowerCase().includes("software") && event.message.toLowerCase().includes("abort")) || (event.message && event.message.toLowerCase().includes("no address"))) {
|
|
314
314
|
this.socketCheckTimeout = window.setTimeout(function () {
|
|
315
|
+
var _a;
|
|
315
316
|
_this.tryToReconectSocket();
|
|
317
|
+
(_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.emitMessageToSource(VaniEvent.OnReconecting, {});
|
|
316
318
|
}, 1000);
|
|
317
319
|
}
|
|
318
320
|
else {
|