vani-meeting-server 1.6.0 → 1.6.1
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.
|
@@ -320,8 +320,8 @@ class EachSocketConnectionHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
320
320
|
});
|
|
321
321
|
this.redisBroadcastMessageToTopic(this.selfParticipant.userId, this.preapreClientMessageBody(true, this.selfParticipant, this.preapreWebSocketMessageBody(WebSocketBasicEvents.OnServerParticipants, userMap)));
|
|
322
322
|
}
|
|
323
|
-
startPingPong() {
|
|
324
|
-
if (this.isUserJoinedFromAnotherSocket === false && this.selfParticipant) {
|
|
323
|
+
async startPingPong() {
|
|
324
|
+
if (this.isUserJoinedFromAnotherSocket === false && this.selfParticipant && this.selfParticipant.roomId && this.selfParticipant.userId) {
|
|
325
325
|
if (this.numberOfPongWaiting > 8) {
|
|
326
326
|
console.log("No Pong More Than 8 Times start");
|
|
327
327
|
console.log(this.selfParticipant);
|
|
@@ -330,10 +330,13 @@ class EachSocketConnectionHandler extends BaseSFUWebsocket_1.BaseSFUWebsocket {
|
|
|
330
330
|
this.onUserLeft();
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
const user = await RedisHandler_1.RedisHandler.getInstance().getParticipantByUserId(this.selfParticipant.roomId, this.selfParticipant.userId);
|
|
334
|
+
if (user) {
|
|
335
|
+
this.redisBroadcastMessageToTopic(this.selfParticipant.userId, this.preapreClientMessageBody(true, this.selfParticipant, this.preapreWebSocketMessageBody(WebSocketBasicEvents.Ping, { userId: this.selfParticipant.userId })));
|
|
336
|
+
this.numberOfPongWaiting = this.numberOfPongWaiting + 1;
|
|
337
|
+
console.log("Pong", this.numberOfPongWaiting);
|
|
338
|
+
setTimeout(this.startPingPong, 5000);
|
|
339
|
+
}
|
|
337
340
|
}
|
|
338
341
|
}
|
|
339
342
|
cleanUp() {
|