Configuration to disable custom denoise

هذا الالتزام موجود في:
Dmitry Lenshin
2025-09-24 13:17:34 +03:00
الأصل 89759157e9
التزام 8ba07cfa3e
5 ملفات معدلة مع 20 إضافات و5 حذوفات

عرض الملف

@@ -1124,10 +1124,8 @@ async function whoAreYou() {
const serverButtons = response.data.message;
if (serverButtons) {
// Merge serverButtons into BUTTONS, keeping the existing keys in BUTTONS if they are not present in serverButtons
BUTTONS = {
...BUTTONS, // Spread current BUTTONS first to keep existing keys
...serverButtons, // Overwrite or add new keys from serverButtons
};
BUTTONS = mergeConfig(BUTTONS, serverButtons);
console.log('04 ----> AXIOS ROOM BUTTONS SETTINGS', {
serverButtons: serverButtons,
clientButtons: BUTTONS,
@@ -1289,6 +1287,17 @@ async function whoAreYou() {
}
}
function mergeConfig(current, updated) {
for (const key of Object.keys(updated)) {
if (!current.hasOwnProperty(key) || typeof updated[key] !== 'object') {
current[key] = updated[key];
} else {
mergeConfig(current[key], updated[key]);
}
}
return current;
}
function handleAudio() {
isAudioAllowed = isAudioAllowed ? false : true;
initAudioButton.className = 'fas fa-microphone' + (isAudioAllowed ? '' : '-slash');
@@ -1698,6 +1707,7 @@ function roomIsReady() {
BUTTONS.settings.broadcastingButton && show(broadcastingButton);
BUTTONS.settings.lobbyButton && show(lobbyButton);
BUTTONS.settings.sendEmailInvitation && show(sendEmailInvitation);
!BUTTONS.settings.customNoiseSuppression && hide(noiseSuppressionButton);
if (rc.recording.recSyncServerRecording) show(roomRecordingServer);
BUTTONS.main.aboutButton && show(aboutButton);
if (!isMobileDevice) show(pinUnpinGridDiv);

عرض الملف

@@ -1773,7 +1773,7 @@ class RoomClient {
}
}
if (audio) {
if (audio && BUTTONS.settings.customNoiseSuppression) {
/*
* Initialize RNNoise Suppression if enabled and supported
* This will only apply to audio tracks

عرض الملف

@@ -56,6 +56,7 @@ let BUTTONS = {
pushToTalk: true,
keyboardShortcuts: true,
virtualBackground: true,
customNoiseSuppression: true,
},
producerVideo: {
videoPictureInPicture: true,