Skip to content

Commit

Permalink
[mirotalksfu] - improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jan 5, 2025
1 parent d97ecef commit e75e5f6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 31 deletions.
2 changes: 1 addition & 1 deletion app/src/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,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.6.79
* @version 1.6.80
*
*/

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
"version": "1.6.79",
"version": "1.6.80",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {
Expand Down Expand Up @@ -78,7 +78,7 @@
"mediasoup-client": "3.8.1",
"ngrok": "^5.0.0-beta.2",
"nodemailer": "^6.9.16",
"openai": "^4.77.0",
"openai": "^4.77.3",
"qs": "6.13.1",
"socket.io": "4.8.1",
"swagger-ui-express": "5.0.1",
Expand Down
4 changes: 2 additions & 2 deletions public/js/Room.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
* @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.6.79
* @version 1.6.80
*
*/

Expand Down Expand Up @@ -4676,7 +4676,7 @@ function showAbout() {
imageUrl: image.about,
customClass: { image: 'img-about' },
position: 'center',
title: 'WebRTC SFU v1.6.79',
title: 'WebRTC SFU v1.6.80',
html: `
<br />
<div id="about">
Expand Down
47 changes: 21 additions & 26 deletions public/js/RoomClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.6.79
* @version 1.6.80
*
*/

Expand Down Expand Up @@ -728,18 +728,6 @@ class RoomClient {
break;
case 'disconnected':
console.log('Producer Transport disconnected', { id: this.producerTransport.id });

this.restartIce();

this.toast(
'warning',
'Producer Transport lost',
'Network connection may have dropped or changed (Restarted ICE)',
'top-end',
6000,
true,
);

break;
case 'failed':
console.warn('Producer Transport failed', { id: this.producerTransport.id });
Expand Down Expand Up @@ -816,18 +804,6 @@ class RoomClient {
break;
case 'disconnected':
console.log('Consumer Transport disconnected', { id: this.consumerTransport.id });

this.restartIce();

this.toast(
'warning',
'Consumer Transport lost',
'Network connection may have dropped or changed (Restarted ICE)',
'top-end',
6000,
true,
);

break;
case 'failed':
console.warn('Consumer Transport failed', { id: this.consumerTransport.id });
Expand Down Expand Up @@ -1089,10 +1065,29 @@ class RoomClient {
};

handleSocketDisconnect = () => {
this.toast(
'warning',
'Socket Disconnected',
'Network connection may have dropped or changed!',
'top-end',
3000,
true,
);
setTimeout(() => {
console.log('SocketOn Disconnect attempting to reconnect...');
this.socket.connect();
this.socket.once('connect_error', () => {
console.warn('Connection failed. Server down or in maintenance');
this.byeBye();
});
}, 3000);
};

byeBye() {
this.exit(true);
this.ServerAway();
this.saveRecording('Socket disconnected');
};
}

handleEndRTMP = (data) => {
this.endRTMP(data);
Expand Down

0 comments on commit e75e5f6

Please sign in to comment.