[mirotalksfu] - #200 improvements

هذا الالتزام موجود في:
Miroslav Pejic
2025-06-12 18:18:57 +02:00
الأصل 4d8c79522b
التزام f00307d62f

عرض الملف

@@ -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();