vani-meeting-client 0.6.1 → 0.6.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.
|
@@ -349,7 +349,7 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
349
349
|
}, 200);
|
|
350
350
|
};
|
|
351
351
|
WebsocketHandler.prototype.onMessage = function (message) {
|
|
352
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
352
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
353
353
|
this.lastPingTimeStamp = new Date().getTime();
|
|
354
354
|
var messagejson = JSON.parse(message);
|
|
355
355
|
if (messagejson.type && messagejson.data) {
|
|
@@ -365,25 +365,29 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
365
365
|
else if (type === WebSocketBasicEvents.IsSetupDone) {
|
|
366
366
|
this.onSetupDone(data);
|
|
367
367
|
}
|
|
368
|
-
else if (type === WebSocketBasicEvents.
|
|
369
|
-
console.log(" data.message.participant OnParticipantUpdated", data);
|
|
368
|
+
else if (type === WebSocketBasicEvents.OnNewJoinee) {
|
|
370
369
|
if (data && data.message && data.message.participant) {
|
|
371
370
|
console.log("OnParticipantUpdated from server", data.message.participant);
|
|
372
371
|
(_b = this.communicationHandler) === null || _b === void 0 ? void 0 : _b.addParticipantIfNotExist(data.message.participant, true);
|
|
373
372
|
}
|
|
374
373
|
}
|
|
374
|
+
else if (type === WebSocketBasicEvents.OnParticipantUpdated) {
|
|
375
|
+
if (data) {
|
|
376
|
+
(_c = this.communicationHandler) === null || _c === void 0 ? void 0 : _c.addParticipantIfNotExist(data, true);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
375
379
|
else if (type === WebSocketBasicEvents.OnUserLeft) {
|
|
376
|
-
(
|
|
380
|
+
(_d = this.communicationHandler) === null || _d === void 0 ? void 0 : _d.onUserLeft(data);
|
|
377
381
|
}
|
|
378
382
|
else if (type === WebSocketBasicEvents.OnServerParticipants) {
|
|
379
|
-
(
|
|
383
|
+
(_e = this.communicationHandler) === null || _e === void 0 ? void 0 : _e.onServerParticipants(data);
|
|
380
384
|
}
|
|
381
385
|
else if (type === WebSocketBasicEvents.OnOldMessages) {
|
|
382
|
-
(
|
|
386
|
+
(_f = this.communicationHandler) === null || _f === void 0 ? void 0 : _f.onOldMessages(data);
|
|
383
387
|
}
|
|
384
388
|
else if (type === WebSocketBasicEvents.OnChat) {
|
|
385
389
|
if (data.message) {
|
|
386
|
-
(
|
|
390
|
+
(_g = this.communicationHandler) === null || _g === void 0 ? void 0 : _g.onMessage(data.message);
|
|
387
391
|
}
|
|
388
392
|
}
|
|
389
393
|
else if (type === WebSocketBasicEvents.OnMeetingStartTime) {
|
|
@@ -392,23 +396,23 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
392
396
|
if (time > new Date().getTime()) {
|
|
393
397
|
time = new Date().getTime();
|
|
394
398
|
}
|
|
395
|
-
(
|
|
399
|
+
(_h = this.communicationHandler) === null || _h === void 0 ? void 0 : _h.emitMessageToSource(VaniEvent.OnMeetingStartTime, (time + ""));
|
|
396
400
|
}
|
|
397
401
|
}
|
|
398
402
|
else if (type === WebSocketBasicEvents.OnAudioVideoStatusUpdated) {
|
|
399
|
-
(
|
|
403
|
+
(_j = this.communicationHandler) === null || _j === void 0 ? void 0 : _j.onAudioVideoStatusUpdated(data);
|
|
400
404
|
}
|
|
401
405
|
else if (type === WebSocketBasicEvents.OnAudioBlockRequest) {
|
|
402
|
-
(
|
|
406
|
+
(_k = this.communicationHandler) === null || _k === void 0 ? void 0 : _k.onAudioBlocked(data);
|
|
403
407
|
}
|
|
404
408
|
else if (type === WebSocketBasicEvents.OnAudioUnblockRequest) {
|
|
405
|
-
(
|
|
409
|
+
(_l = this.communicationHandler) === null || _l === void 0 ? void 0 : _l.onAudioUnblocked(data);
|
|
406
410
|
}
|
|
407
411
|
else if (type === WebSocketBasicEvents.OnVideoBlockRequest) {
|
|
408
|
-
(
|
|
412
|
+
(_m = this.communicationHandler) === null || _m === void 0 ? void 0 : _m.onVideoBlocked(data);
|
|
409
413
|
}
|
|
410
414
|
else if (type === WebSocketBasicEvents.OnVideoUnblockRequest) {
|
|
411
|
-
(
|
|
415
|
+
(_o = this.communicationHandler) === null || _o === void 0 ? void 0 : _o.onVideoUnblocked(data);
|
|
412
416
|
}
|
|
413
417
|
}
|
|
414
418
|
};
|