[mirotalk] - fix screen fps and video quality set

This commit is contained in:
Miroslav Pejic
2025-10-28 20:35:11 +01:00
parent b59be5063b
commit a0c601fccd
5 changed files with 26 additions and 20 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ dependencies: {
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.6.02
* @version 1.6.03
*
*/
+6 -6
View File
@@ -1,18 +1,18 @@
{
"name": "mirotalk",
"version": "1.6.02",
"version": "1.6.03",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mirotalk",
"version": "1.6.02",
"version": "1.6.03",
"license": "AGPL-3.0",
"dependencies": {
"@mattermost/client": "10.12.0",
"@ngrok/ngrok": "1.5.2",
"@sentry/node": "^10.22.0",
"axios": "^1.13.0",
"axios": "^1.13.1",
"chokidar": "^4.0.3",
"colors": "^1.4.0",
"compression": "^1.8.1",
@@ -1583,9 +1583,9 @@
"license": "MIT"
},
"node_modules/axios": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.0.tgz",
"integrity": "sha512-zt40Pz4zcRXra9CVV31KeyofwiNvAbJ5B6YPz9pMJ+yOSLikvPT4Yi5LjfgjRa9CawVYBaD1JQzIVcIvBejKeA==",
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.1.tgz",
"integrity": "sha512-hU4EGxxt+j7TQijx1oYdAjw4xuIp1wRQSsbMFwSthCWeBQur1eF+qJ5iQ5sN3Tw8YRzQNKb8jszgBdMDVqwJcw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.6.02",
"version": "1.6.03",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
@@ -44,7 +44,7 @@
"@mattermost/client": "10.12.0",
"@ngrok/ngrok": "1.5.2",
"@sentry/node": "^10.22.0",
"axios": "^1.13.0",
"axios": "^1.13.1",
"chokidar": "^4.0.3",
"colors": "^1.4.0",
"compression": "^1.8.1",
+1 -1
View File
@@ -75,7 +75,7 @@ let brand = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: 'WebRTC P2P v1.6.02',
title: 'WebRTC P2P v1.6.03',
html: `
<button
id="support-button"
+16 -10
View File
@@ -15,7 +15,7 @@
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.6.02
* @version 1.6.03
*
*/
@@ -6745,12 +6745,14 @@ async function setLocalMaxFps(maxFrameRate, type = 'camera') {
if (!useVideo || !localVideoMediaStream || isFirefox) return;
const videoTrack = getVideoTrack(localVideoMediaStream);
if (!videoTrack) return;
const screenTrack = getVideoTrack(localScreenMediaStream);
videoTrack
if (!videoTrack && !screenTrack) return;
(isScreenStreaming ? screenTrack : videoTrack)
.applyConstraints({ frameRate: maxFrameRate })
.then(() => {
logStreamSettingsInfo('setLocalMaxFps', localVideoMediaStream);
logStreamSettingsInfo('setLocalMaxFps', videoTrack ? localVideoMediaStream : localScreenMediaStream);
type === 'camera'
? (videoFpsSelectedIndex = videoFpsSelect.selectedIndex)
: (screenFpsSelectedIndex = screenFpsSelect.selectedIndex);
@@ -6768,14 +6770,18 @@ async function setLocalMaxFps(maxFrameRate, type = 'camera') {
* Set local video quality: https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/applyConstraints
*/
async function setLocalVideoQuality() {
if (!localVideoMediaStream) return;
const videoTrack = getVideoTrack(localVideoMediaStream);
if (!videoTrack) return;
const videoConstraints = getVideoConstraints(videoQualitySelect.value ? videoQualitySelect.value : 'default');
videoTrack
const screenTrack = getVideoTrack(localScreenMediaStream);
if (!videoTrack && !screenTrack) return;
const videoQuality = videoQualitySelect.value ? videoQualitySelect.value : 'default';
const videoConstraints = getVideoConstraints(videoQuality);
(isScreenStreaming ? screenTrack : videoTrack)
.applyConstraints(videoConstraints)
.then(() => {
logStreamSettingsInfo('setLocalVideoQuality', localVideoMediaStream);
logStreamSettingsInfo('setLocalVideoQuality', videoTrack ? localVideoMediaStream : localScreenMediaStream);
videoQualitySelectedIndex = videoQualitySelect.selectedIndex;
})
.catch((err) => {
@@ -12056,7 +12062,7 @@ function showAbout() {
Swal.fire({
background: swBg,
position: 'center',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.02',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.03',
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
customClass: { image: 'img-about' },
html: `