diff --git a/app/src/Server.js b/app/src/Server.js
index 91c6ad94..e649e639 100644
--- a/app/src/Server.js
+++ b/app/src/Server.js
@@ -58,7 +58,7 @@ dev dependencies: {
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
- * @version 1.7.65
+ * @version 1.7.66
*
*/
diff --git a/package.json b/package.json
index 4eaf8d09..3b5ea77d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
- "version": "1.7.65",
+ "version": "1.7.66",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {
diff --git a/public/js/Brand.js b/public/js/Brand.js
index 7c548361..ab151a15 100644
--- a/public/js/Brand.js
+++ b/public/js/Brand.js
@@ -64,7 +64,7 @@ let BRAND = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
- title: 'WebRTC SFU v1.7.65',
+ title: 'WebRTC SFU v1.7.66',
html: `
diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js
index f218a79a..ba7a630e 100644
--- a/public/js/RoomClient.js
+++ b/public/js/RoomClient.js
@@ -9,7 +9,7 @@
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
- * @version 1.7.65
+ * @version 1.7.66
*
*/
@@ -237,7 +237,6 @@ class RoomClient {
this.maxReconnectInterval = 15000;
// Handle ICE
- this.iceMaxRetries = 3;
this.iceRestarting = false;
this.iceProducerRestarting = false;
this.iceConsumerRestarting = false;
@@ -896,72 +895,33 @@ class RoomClient {
// ####################################################
async restartTransportIce(transport, type) {
- if (!transport || typeof transport !== 'object' || transport.closed || this[`ice${type}Restarting`]) return;
+ if (!transport || typeof transport !== 'object' || transport.closed) return;
try {
- this[`ice${type}Restarting`] = true;
-
- if (transport.connectionState !== 'disconnected') return;
-
console.warn(`🔄 Restarting ${type} ICE...`, {
id: transport.id,
state: transport.connectionState,
});
- let retryCount = 0;
- while (retryCount < this.iceMaxRetries) {
- try {
- const iceParameters = await Promise.race([
- this.socket.request('restartIce', { transport_id: transport.id }),
- new Promise((_, reject) =>
- setTimeout(() => reject(new Error('ICE restart timeout')), 5000 + retryCount * 5000),
- ),
- ]);
+ const iceParameters = await this.socket.request('restartIce', {
+ transport_id: transport.id,
+ });
- if (!iceParameters) {
- console.warn(`⚠️ No ${type} ICE Parameters received.`);
- return;
- }
-
- console.info(`🚀 Restarting ${type} transport ICE`, iceParameters);
- await transport.restartIce({ iceParameters });
-
- console.info(`✅ Successfully restarted ${type} ICE`);
- return;
- } catch (error) {
- retryCount++;
- console.error(`❌ ${type} ICE restart failed (attempt ${retryCount})`, {
- id: transport.id,
- error: error.message,
- });
-
- if (retryCount >= this.iceMaxRetries) {
- console.error(`🚨 Max retries reached for ${type} ICE restart.`);
-
- transport.close();
-
- popupHtmlMessage(
- null,
- image.network,
- 'Transport closed',
- 'Unable to reconnect. Please check your network.',
- 'center',
- false,
- true,
- );
- return;
- }
-
- await new Promise((resolve) => setTimeout(resolve, 5000 * retryCount));
- }
+ if (!iceParameters) {
+ console.warn(`⚠️ No ${type} ICE Parameters received`);
+ return;
}
+
+ console.info(`🚀 Restarting ${type} transport ICE`, iceParameters);
+
+ await transport.restartIce({ iceParameters });
+
+ console.info(`✅ Successfully restarted ${type} ICE`);
} catch (error) {
console.error(`🔥 Restart ${type} ICE error`, {
id: transport?.id,
error: error.message,
});
- } finally {
- this[`ice${type}Restarting`] = false;
}
}