vani-meeting-client 1.1.4 → 1.1.5
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,26 +145,30 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
145
145
|
this.emitMessageToSource(VaniEvent.OnParticipantDataUpdated, oldParticipant);
|
|
146
146
|
}
|
|
147
147
|
this.updateParticipantAudioVideoDataAccordingToTrack(oldParticipant);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
try {
|
|
149
|
+
if (oldParticipant.userId === ((_a = this.meetingStartRequest) === null || _a === void 0 ? void 0 : _a.userId)) {
|
|
150
|
+
this.meetingStartRequest.userData = oldParticipant.userData;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (err) {
|
|
154
|
+
}
|
|
155
155
|
return oldParticipant;
|
|
156
156
|
}
|
|
157
157
|
else {
|
|
158
158
|
participant = Object.assign(new Participant(participant.userId, participant.roomId, participant.userData, participant.isAdmin), participant);
|
|
159
159
|
this.updateParticipantAudioVideoDataAccordingToTrack(participant);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
try {
|
|
161
|
+
if (participant.userId === ((_b = this.meetingStartRequest) === null || _b === void 0 ? void 0 : _b.userId)) {
|
|
162
|
+
this.meetingStartRequest.userData = participant.userData;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch (err) {
|
|
166
|
+
}
|
|
163
167
|
this.allParticipants.push(participant);
|
|
164
168
|
if (shouldInfrom) {
|
|
165
169
|
this.emitMessageToSource(VaniEvent.OnUserJoined, participant);
|
|
166
170
|
}
|
|
167
|
-
(
|
|
171
|
+
(_c = this.videoCallHandler) === null || _c === void 0 ? void 0 : _c.onParticipantUpdated();
|
|
168
172
|
return participant;
|
|
169
173
|
}
|
|
170
174
|
};
|