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