[mirotalksfu] - #200 improvements
هذا الالتزام موجود في:
@@ -1067,8 +1067,8 @@ class RoomClient {
|
|||||||
this.socket.io.on('reconnect', this.handleSocketReconnect);
|
this.socket.io.on('reconnect', this.handleSocketReconnect);
|
||||||
this.socket.io.on('reconnect_failed', this.handleSocketReconnectFailed);
|
this.socket.io.on('reconnect_failed', this.handleSocketReconnectFailed);
|
||||||
this.socket.on('connect', this.handleSocketConnect);
|
this.socket.on('connect', this.handleSocketConnect);
|
||||||
this.socket.on('disconnect', this.handleSocketDisconnect);
|
|
||||||
this.socket.on('connect_error', this.handleSocketConnectionError);
|
this.socket.on('connect_error', this.handleSocketConnectionError);
|
||||||
|
this.socket.on('disconnect', this.handleSocketDisconnect);
|
||||||
this.socket.on('consumerClosed', this.handleConsumerClosed);
|
this.socket.on('consumerClosed', this.handleConsumerClosed);
|
||||||
this.socket.on('setVideoOff', this.handleSetVideoOff);
|
this.socket.on('setVideoOff', this.handleSetVideoOff);
|
||||||
this.socket.on('removeMe', this.handleRemoveMe);
|
this.socket.on('removeMe', this.handleRemoveMe);
|
||||||
@@ -1383,12 +1383,7 @@ class RoomClient {
|
|||||||
|
|
||||||
const delay = Math.min(this.reconnectInterval * attempt, this.maxReconnectInterval);
|
const delay = Math.min(this.reconnectInterval * attempt, this.maxReconnectInterval);
|
||||||
|
|
||||||
if (this.reconnectAlert) {
|
this.updateReconnectAlert(delay);
|
||||||
this.reconnectAlert.update({
|
|
||||||
title: 'Reconnecting',
|
|
||||||
text: `Reconnection attempt in ${delay / 1000} seconds...`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDisconnect(reason) {
|
handleDisconnect(reason) {
|
||||||
@@ -1425,6 +1420,15 @@ class RoomClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateReconnectAlert(delay) {
|
||||||
|
if (this.reconnectAlert) {
|
||||||
|
this.reconnectAlert.update({
|
||||||
|
title: 'Reconnecting',
|
||||||
|
text: `Reconnection attempt in ${delay / 1000} seconds...`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
closeReconnectAlert() {
|
closeReconnectAlert() {
|
||||||
if (this.reconnectAlert) {
|
if (this.reconnectAlert) {
|
||||||
this.reconnectAlert.close();
|
this.reconnectAlert.close();
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم