vani-meeting-client 0.5.5 → 0.5.8
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/MeetingHandler.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare class MeetingHandler {
|
|
|
35
35
|
getAllParticipants(): Participant[];
|
|
36
36
|
getAllTracks(): Track[];
|
|
37
37
|
getTracksByParticipantId(participantId: string): Track[];
|
|
38
|
+
isWebScoketConnected(): boolean;
|
|
38
39
|
sendMessage(message: MessagePayload): TaskResponse;
|
|
39
40
|
getOldMessages(): Promise<void>;
|
|
40
41
|
onOldMessages(data: any): Promise<void>;
|
package/lib/MeetingHandler.js
CHANGED
|
@@ -309,6 +309,13 @@ var MeetingHandler = /** @class */ (function () {
|
|
|
309
309
|
}
|
|
310
310
|
return [];
|
|
311
311
|
};
|
|
312
|
+
MeetingHandler.prototype.isWebScoketConnected = function () {
|
|
313
|
+
var _a;
|
|
314
|
+
if (this.websocketCallHandler) {
|
|
315
|
+
return (_a = this.websocketCallHandler) === null || _a === void 0 ? void 0 : _a.isWebScoketConnected();
|
|
316
|
+
}
|
|
317
|
+
return false;
|
|
318
|
+
};
|
|
312
319
|
///Messages
|
|
313
320
|
MeetingHandler.prototype.sendMessage = function (message) {
|
|
314
321
|
var _a, _b, _c;
|
|
@@ -134,7 +134,10 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
134
134
|
if (shouldInfrom === void 0) { shouldInfrom = false; }
|
|
135
135
|
var oldParticipant = this.participantByUserId(participant.userId);
|
|
136
136
|
if (oldParticipant) {
|
|
137
|
+
console.log("Old participant", oldParticipant);
|
|
138
|
+
console.log("new participant", participant);
|
|
137
139
|
oldParticipant = Object.assign(oldParticipant, participant);
|
|
140
|
+
console.log("Old participant after update", oldParticipant);
|
|
138
141
|
if (shouldInfrom) {
|
|
139
142
|
this.emitMessageToSource(VaniEvent.OnParticipantDataUpdated, oldParticipant);
|
|
140
143
|
}
|
|
@@ -367,6 +367,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
367
367
|
}
|
|
368
368
|
else if (type === WebSocketBasicEvents.OnParticipantUpdated || type === WebSocketBasicEvents.OnNewJoinee) {
|
|
369
369
|
if (data && data.message && data.message.participant) {
|
|
370
|
+
console.log("OnParticipantUpdated from server", data.message.participant);
|
|
370
371
|
(_b = this.communicationHandler) === null || _b === void 0 ? void 0 : _b.addParticipantIfNotExist(data.message.participant, true);
|
|
371
372
|
}
|
|
372
373
|
}
|