vani-meeting-client 0.4.3 → 0.4.4
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.
|
@@ -133,18 +133,14 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
133
133
|
if (shouldInfrom === void 0) { shouldInfrom = false; }
|
|
134
134
|
var oldParticipant = this.participantByUserId(participant.userId);
|
|
135
135
|
if (oldParticipant) {
|
|
136
|
-
console.log("oldParticipant");
|
|
137
136
|
oldParticipant = Object.assign(oldParticipant, participant);
|
|
138
137
|
if (shouldInfrom) {
|
|
139
138
|
this.emitMessageToSource(VaniEvent.OnParticipantDataUpdated, oldParticipant);
|
|
140
139
|
}
|
|
141
|
-
console.log(oldParticipant);
|
|
142
140
|
return oldParticipant;
|
|
143
141
|
}
|
|
144
142
|
else {
|
|
145
|
-
console.log("new participant");
|
|
146
143
|
participant = Object.assign(new Participant(participant.userId, participant.roomId, participant.userData, participant.isAdmin), participant);
|
|
147
|
-
console.log(participant);
|
|
148
144
|
this.allParticipants.push(participant);
|
|
149
145
|
if (shouldInfrom) {
|
|
150
146
|
this.emitMessageToSource(VaniEvent.OnUserJoined, participant);
|
|
@@ -209,14 +205,17 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
209
205
|
if (shouldInfromIfNotExist === void 0) { shouldInfromIfNotExist = false; }
|
|
210
206
|
var oldTrack = this.getTrackById(track.trackId);
|
|
211
207
|
if (oldTrack) {
|
|
208
|
+
log.info("oldtrack found");
|
|
212
209
|
track = Object.assign(oldTrack, track);
|
|
213
210
|
}
|
|
214
211
|
else {
|
|
212
|
+
log.info("new track found");
|
|
215
213
|
track = Object.assign(new Track(participant, track.isLocalTrack, track.trackKind, track.track), track);
|
|
216
214
|
this.allTracks.push(track);
|
|
217
215
|
}
|
|
218
216
|
track.participant = participant;
|
|
219
217
|
if (shouldInfromIfNotExist) {
|
|
218
|
+
log.info("emitMessageToSource");
|
|
220
219
|
this.emitMessageToSource(VaniEvent.OnTrack, track);
|
|
221
220
|
}
|
|
222
221
|
return track;
|
|
@@ -501,6 +501,7 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
501
501
|
log.info(data);
|
|
502
502
|
var participant = (_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.addParticipantIfNotExist(data.participant, true);
|
|
503
503
|
if (participant) {
|
|
504
|
+
log.info("participant found");
|
|
504
505
|
var track = new Track(participant, false, data.trackKind, mediaTrack);
|
|
505
506
|
(_b = _this.communicationHandler) === null || _b === void 0 ? void 0 : _b.addUpdateRemoteTrack(track, participant, true);
|
|
506
507
|
}
|