Skip to content

Commit

Permalink
[mirotalkc2c] - allow video up to 8k!
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Aug 3, 2024
1 parent 7aa11a7 commit 47faff2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com or purchase it directly via Code Canyon:
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.1.24
* @version 1.1.25
*/

require('dotenv').config();
Expand Down
2 changes: 2 additions & 0 deletions frontend/html/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ <h1>Waiting...</h1>
<option value="fhd">FULL HD</option>
<option value="2k">2K</option>
<option value="4k">4K</option>
<option value="6k">6K</option>
<option value="8k">8K</option>
</select>
<label><i class="fas fa-gauge"></i> Video frame rate</label>
<select id="videoFpsSelect">
Expand Down
26 changes: 22 additions & 4 deletions frontend/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com or purchase it directly via Code Canyon:
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.1.24
* @version 1.1.25
*/

const roomId = new URLSearchParams(window.location.search).get('room');
Expand Down Expand Up @@ -828,7 +828,7 @@ function handleEvents() {
popupMessage(
'toast',
'Max video quality and fps',
'If Active, The video resolution will be forced up to 4k and 60fps! (High bandwidth required)',
'If Active, The video resolution will be forced up to 8k and 60fps! (Very High bandwidth is required)',
'top',
6000,
);
Expand Down Expand Up @@ -1044,8 +1044,8 @@ function getVideoConstraints(deviceId = false) {
if (localStorageConfig.video.settings.best_quality) {
resetVideoConstraints();
videoConstraints = {
width: { ideal: 3840 },
height: { ideal: 2160 },
width: { ideal: 7680 },
height: { ideal: 4320 },
frameRate: { ideal: 60 },
};
} else {
Expand Down Expand Up @@ -1104,6 +1104,22 @@ function getVideoConstraints(deviceId = false) {
frameRate: videoFrameRate,
};
break;
case '6k':
constraints = {
width: { exact: 6144 },
height: { exact: 3456 },
frameRate: frameRate,
};
break;
case '8k':
constraints = {
width: { exact: 7680 },
height: { exact: 4320 },
frameRate: frameRate,
};
break;
default:
break;
}
}
if (deviceId) videoConstraints['deviceId'] = deviceId;
Expand Down Expand Up @@ -1508,6 +1524,8 @@ function handlePeerStatus(config) {
case 'screen':
setPeerScreenStatus(peerId, active);
break;
default:
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkc2c",
"version": "1.1.24",
"version": "1.1.25",
"description": "A free WebRTC Cam-2-Cam browser-based video calls",
"main": "server.js",
"scripts": {
Expand Down

0 comments on commit 47faff2

Please sign in to comment.