diff --git a/package-lock.json b/package-lock.json
index 0b6dccd7..afbd9ff6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,16 +1,16 @@
{
"name": "mirotalksfu",
- "version": "1.9.06",
+ "version": "1.9.07",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mirotalksfu",
- "version": "1.9.06",
+ "version": "1.9.07",
"license": "AGPL-3.0",
"dependencies": {
- "@aws-sdk/client-s3": "^3.848.0",
- "@aws-sdk/lib-storage": "^3.848.0",
+ "@aws-sdk/client-s3": "^3.850.0",
+ "@aws-sdk/lib-storage": "^3.850.0",
"@mattermost/client": "10.8.0",
"@ngrok/ngrok": "1.5.1",
"@sentry/node": "^9.40.0",
@@ -297,9 +297,9 @@
}
},
"node_modules/@aws-sdk/client-s3": {
- "version": "3.848.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.848.0.tgz",
- "integrity": "sha512-6uT+THQfsB92eAH0p5zvpGiSCtO2ZhGwmuw6HWEngui53YIWz7W/GCnN0G7nrKpgD5DPrMaBwqZvKuoAh9NHAQ==",
+ "version": "3.850.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.850.0.tgz",
+ "integrity": "sha512-tX5bUfqiLOh6jtAlaiAuOUKFYh8KDG9k9zFLUdgGplC5TP47AYTreUEg+deCTHo4DD3YCvrLuyZ8tIDgKu7neQ==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha1-browser": "5.2.0",
@@ -591,9 +591,9 @@
}
},
"node_modules/@aws-sdk/lib-storage": {
- "version": "3.848.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.848.0.tgz",
- "integrity": "sha512-Q23bI829ZQBHP6Iab9YsfCrZKvek2uMIVYEQjPa0Ekib5bmqURFCXhNtrP++TOCaZNr5DmSPAqAs8EGHWTOZiw==",
+ "version": "3.850.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.850.0.tgz",
+ "integrity": "sha512-DKG8mKeUMLRboyqwhKiV9QOiKXN00OYLnGsT21mhlaF1Uc7OZ6Vm+Olw4YrbYSBuDup0rMWtVaWudJ49I+ZCHA==",
"license": "Apache-2.0",
"dependencies": {
"@smithy/abort-controller": "^4.0.4",
@@ -608,7 +608,7 @@
"node": ">=18.0.0"
},
"peerDependencies": {
- "@aws-sdk/client-s3": "^3.848.0"
+ "@aws-sdk/client-s3": "^3.850.0"
}
},
"node_modules/@aws-sdk/lib-storage/node_modules/buffer": {
diff --git a/package.json b/package.json
index 9c80e811..95c5f06a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
- "version": "1.9.06",
+ "version": "1.9.07",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {
@@ -57,8 +57,8 @@
"node": ">=18"
},
"dependencies": {
- "@aws-sdk/client-s3": "^3.848.0",
- "@aws-sdk/lib-storage": "^3.848.0",
+ "@aws-sdk/client-s3": "^3.850.0",
+ "@aws-sdk/lib-storage": "^3.850.0",
"@mattermost/client": "10.8.0",
"@ngrok/ngrok": "1.5.1",
"@sentry/node": "^9.40.0",
diff --git a/public/js/Brand.js b/public/js/Brand.js
index bf040178..d9cf4a68 100644
--- a/public/js/Brand.js
+++ b/public/js/Brand.js
@@ -76,7 +76,7 @@ let BRAND = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
- title: 'WebRTC SFU v1.9.06',
+ title: 'WebRTC SFU v1.9.07',
html: `
diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js
index 3797173c..73d0f877 100644
--- a/public/js/RoomClient.js
+++ b/public/js/RoomClient.js
@@ -1911,18 +1911,7 @@ class RoomClient {
return producer;
} catch (err) {
console.error('Produce error:', err);
-
handleMediaError(type, err);
-
- if (!audio && !screen && videoQuality.selectedIndex != 0) {
- videoQuality.selectedIndex = this.videoQualitySelectedIndex;
- this.sound('alert');
- this.userLog(
- 'error',
- `Your device doesn't support the selected video quality (${videoQuality.value}), please select the another one.`,
- 'top-end'
- );
- }
}
}
@@ -2216,53 +2205,69 @@ class RoomClient {
const defaultFrameRate = { ideal: 30 };
const selectedValue = this.getSelectedIndexValue(videoFps);
const customFrameRate = parseInt(selectedValue, 10);
- const frameRate = selectedValue === 'max' ? defaultFrameRate : { ideal: customFrameRate };
+ const frameRate = selectedValue === 'max' ? defaultFrameRate : customFrameRate;
- // Base constraints structure with dynamic values for resolution and frame rate
- const videoBaseConstraints = (width, height, exact = false) => ({
- audio: false,
- video: {
- width: exact ? { exact: width } : { ideal: width },
- height: exact ? { exact: height } : { ideal: height },
- deviceId: deviceId,
- aspectRatio: 1.777, // 16:9 aspect ratio
- frameRate: frameRate,
- },
- });
+ // Helper to create constraints
+ function createConstraints(width, height, frameRate, isIdeal = false) {
+ const constraints = {
+ width: isIdeal ? { ideal: width } : { exact: width },
+ height: isIdeal ? { ideal: height } : { exact: height },
+ };
+ // Only add frameRate for non-Firefox browsers
+ if (!isFirefox) {
+ constraints.frameRate = isIdeal ? { ideal: frameRate } : frameRate;
+ }
+ return constraints;
+ }
- const videoResolutionMap = {
- qvga: { width: 320, height: 240, exact: true },
- vga: { width: 640, height: 480, exact: true },
- hd: { width: 1280, height: 720, exact: true },
- fhd: { width: 1920, height: 1080, exact: true },
- '2k': { width: 2560, height: 1440, exact: true },
- '4k': { width: 3840, height: 2160, exact: true },
- '6k': { width: 6144, height: 3456, exact: true },
- '8k': { width: 7680, height: 4320, exact: true },
- };
-
- let videoConstraints;
+ let constraints = {};
switch (videoQuality.value) {
case 'default':
- // Default ideal HD resolution
- videoConstraints = videoBaseConstraints(1280, 720);
+ constraints = createConstraints(1280, 720, 30, true);
videoFps.selectedIndex = 0;
videoFps.disabled = true;
break;
+ case 'qvga':
+ constraints = createConstraints(320, 240, frameRate, isFirefox);
+ break;
+ case 'vga':
+ constraints = createConstraints(640, 480, frameRate, isFirefox);
+ break;
+ case 'hd':
+ constraints = createConstraints(1280, 720, frameRate, isFirefox);
+ break;
+ case 'fhd':
+ constraints = createConstraints(1920, 1080, frameRate, isFirefox);
+ break;
+ case '2k':
+ constraints = createConstraints(2560, 1440, frameRate, isFirefox);
+ break;
+ case '4k':
+ constraints = createConstraints(3840, 2160, frameRate, isFirefox);
+ break;
+ case '6k':
+ constraints = createConstraints(6144, 3456, frameRate, isFirefox);
+ break;
+ case '8k':
+ constraints = createConstraints(7680, 4320, frameRate, isFirefox);
+ break;
default:
- // Ideal Full HD if no match found in the video resolution map
- const { width, height, exact } = videoResolutionMap[videoQuality.value] || {
- width: 1920,
- height: 1080,
- };
- videoConstraints = videoBaseConstraints(width, height, exact);
+ // fallback to HD
+ constraints = createConstraints(1280, 720, frameRate, isFirefox);
break;
}
- this.videoQualitySelectedIndex = videoQuality.selectedIndex;
+ // Add deviceId if provided
+ if (deviceId) {
+ constraints.deviceId = deviceId;
+ }
- return videoConstraints;
+ // Compose final constraints object
+ return {
+ audio: false,
+ video: constraints,
+ };
}
getScreenConstraints() {
@@ -2272,15 +2277,20 @@ class RoomClient {
const frameRate = selectedValue === 'max' ? defaultFrameRate : { ideal: customFrameRate };
// Base constraints structure with dynamic values for resolution and frame rate
- const screenBaseConstraints = (width, height) => ({
- audio: true,
- video: {
+ const screenBaseConstraints = (width, height) => {
+ const videoConstraints = {
width: { ideal: width },
height: { ideal: height },
aspectRatio: 1.777, // 16:9 aspect ratio
- frameRate: frameRate,
- },
- });
+ };
+ if (!isFirefox) {
+ videoConstraints.frameRate = frameRate;
+ }
+ return {
+ audio: true,
+ video: videoConstraints,
+ };
+ };
const screenResolutionMap = {
hd: { width: 1280, height: 720 },