[mirotalksfu] - add silenceThreshold

هذا الالتزام موجود في:
Miroslav Pejic
2025-07-10 09:12:54 +02:00
الأصل 2d18fc9834
التزام b5505132c6
6 ملفات معدلة مع 16 إضافات و13 حذوفات

4
package-lock.json مولّد
عرض الملف

@@ -1,12 +1,12 @@
{
"name": "mirotalksfu",
"version": "1.8.86",
"version": "1.8.87",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mirotalksfu",
"version": "1.8.86",
"version": "1.8.87",
"license": "AGPL-3.0",
"dependencies": {
"@aws-sdk/client-s3": "^3.842.0",

عرض الملف

@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
"version": "1.8.86",
"version": "1.8.87",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {

عرض الملف

@@ -76,7 +76,7 @@ let BRAND = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: '<strong>WebRTC SFU v1.8.86</strong>',
title: '<strong>WebRTC SFU v1.8.87</strong>',
html: `
<button
id="support-button"

عرض الملف

@@ -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.8.86
* @version 1.8.87
*
*/
@@ -5510,7 +5510,7 @@ function showAbout() {
position: 'center',
imageUrl: BRAND.about?.imageUrl && BRAND.about.imageUrl.trim() !== '' ? BRAND.about.imageUrl : image.about,
customClass: { image: 'img-about' },
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.8.86',
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.8.87',
html: `
<br />
<div id="about">

عرض الملف

@@ -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.8.86
* @version 1.8.87
*
*/

عرض الملف

@@ -1,7 +1,8 @@
// volume-processor.js
'use strict';
class VolumeProcessor extends AudioWorkletProcessor {
constructor() {
super();
this.silenceThreshold = 0.01;
}
process(inputs, outputs, parameters) {
@@ -23,11 +24,13 @@ class VolumeProcessor extends AudioWorkletProcessor {
const rms = Math.sqrt(sum / inputData.length);
const volume = Math.max(0, Math.min(1, rms * 10));
// Send volume data for UI updates
this.port.postMessage({
type: 'volumeIndicator',
volume: volume,
});
// Only send if not silent
if (volume > this.silenceThreshold) {
this.port.postMessage({
type: 'volumeIndicator',
volume: volume,
});
}
return true;
}