diff --git a/desktop/app.js b/desktop/app.js index 25bc725..cc42f0d 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -118,7 +118,6 @@ const el = { vcChannelName: document.getElementById("vc-channel-name"), voiceVideoBtn: document.getElementById("voice-video-btn"), voiceScreenBtn: document.getElementById("voice-screen-btn"), - voiceFilterBtn: document.getElementById("voice-filter-btn"), voiceMuteBtn: document.getElementById("voice-mute-btn"), voiceLeaveBtn: document.getElementById("voice-leave-btn"), videoGrid: document.getElementById("video-grid"), @@ -725,7 +724,6 @@ function stopAndClearAudioPipeline() { state.voice.rawStream = null; state.voice.audioContext = null; state.voice.activeNoiseFilter = 'off'; - updateVoiceFilterButton(); } function stopAndClearVideoPipeline() { @@ -819,8 +817,6 @@ async function buildAudioPipeline(rawStream) { state.voice.activeNoiseFilter = 'off'; } } - updateVoiceFilterButton(); - // Metering/Speaking detection const analyser = ctx.createAnalyser(); analyser.fftSize = 512; @@ -885,34 +881,6 @@ async function getDeepFilterModule() { return state.voice.deepFilterModule; } -function updateVoiceFilterButton() { - if (!el.voiceFilterBtn) return; - const requestedMode = state.voice.noiseFilterMode === 'deepfilter' ? 'DeepFilterNet3' : 'Off'; - const activeMode = state.voice.activeNoiseFilter === 'deepfilter' ? 'DeepFilterNet3' : 'Off'; - const activeSuffix = requestedMode === activeMode ? '' : ` (active: ${activeMode})`; - el.voiceFilterBtn.title = `Noise Filter: ${requestedMode}${activeSuffix}`; - el.voiceFilterBtn.innerHTML = state.voice.noiseFilterMode === 'deepfilter' - ? '' - : ''; - el.voiceFilterBtn.style.color = state.voice.noiseFilterMode === 'deepfilter' - ? 'var(--green)' - : 'var(--text-muted)'; - lucide.createIcons(); -} - -async function toggleNoiseFilter() { - state.voice.noiseFilterMode = state.voice.noiseFilterMode === 'deepfilter' ? 'off' : 'deepfilter'; - updateVoiceFilterButton(); - if (!state.voice.joinedChannelId) return; - - try { - await leaveVoice(); - await joinVoice(); - } catch (err) { - console.error("failed to rejoin voice after filter change", err); - } -} - async function createLocalVoiceStream() { const useDeepFilter = state.voice.noiseFilterMode === 'deepfilter'; const constraints = { @@ -1532,10 +1500,8 @@ async function init() { el.voiceVideoBtn.onclick = toggleVideo; el.voiceScreenBtn.onclick = toggleScreenShare; - if (el.voiceFilterBtn) el.voiceFilterBtn.onclick = toggleNoiseFilter; el.voiceMuteBtn.onclick = toggleMute; el.voiceLeaveBtn.onclick = leaveVoice; - updateVoiceFilterButton(); el.addSoundBtn.onclick = () => { el.soundModal.classList.remove("hidden"); diff --git a/desktop/index.html b/desktop/index.html index c92f049..2bd8957 100644 --- a/desktop/index.html +++ b/desktop/index.html @@ -91,7 +91,6 @@
-
diff --git a/static/app.js b/static/app.js index c57db68..9abc973 100644 --- a/static/app.js +++ b/static/app.js @@ -74,7 +74,6 @@ const el = { vcChannelName: document.getElementById("vc-channel-name"), voiceVideoBtn: document.getElementById("voice-video-btn"), voiceScreenBtn: document.getElementById("voice-screen-btn"), - voiceFilterBtn: document.getElementById("voice-filter-btn"), voiceMuteBtn: document.getElementById("voice-mute-btn"), voiceLeaveBtn: document.getElementById("voice-leave-btn"), videoGrid: document.getElementById("video-grid"), @@ -673,7 +672,6 @@ function stopAndClearAudioPipeline() { state.voice.rawStream = null; state.voice.audioContext = null; state.voice.activeNoiseFilter = 'off'; - updateVoiceFilterButton(); } function stopAndClearVideoPipeline() { @@ -755,34 +753,6 @@ async function getDeepFilterModule() { return state.voice.deepFilterModule; } -function updateVoiceFilterButton() { - if (!el.voiceFilterBtn) return; - const requestedMode = state.voice.noiseFilterMode === 'deepfilter' ? 'DeepFilterNet3' : 'Off'; - const activeMode = state.voice.activeNoiseFilter === 'deepfilter' ? 'DeepFilterNet3' : 'Off'; - const activeSuffix = requestedMode === activeMode ? '' : ` (active: ${activeMode})`; - el.voiceFilterBtn.title = `Noise Filter: ${requestedMode}${activeSuffix}`; - el.voiceFilterBtn.innerHTML = state.voice.noiseFilterMode === 'deepfilter' - ? '' - : ''; - el.voiceFilterBtn.style.color = state.voice.noiseFilterMode === 'deepfilter' - ? 'var(--green)' - : 'var(--text-muted)'; - lucide.createIcons(); -} - -async function toggleNoiseFilter() { - state.voice.noiseFilterMode = state.voice.noiseFilterMode === 'deepfilter' ? 'off' : 'deepfilter'; - updateVoiceFilterButton(); - if (!state.voice.joinedChannelId) return; - - try { - await leaveVoice(); - await joinVoice(); - } catch (err) { - console.error("failed to rejoin voice after filter change", err); - } -} - async function buildAudioPipeline(rawStream) { const ctx = new AudioContext(); state.voice.audioContext = ctx; @@ -809,7 +779,6 @@ async function buildAudioPipeline(rawStream) { state.voice.activeNoiseFilter = 'off'; } } - updateVoiceFilterButton(); // Metering/Speaking detection const analyser = ctx.createAnalyser(); @@ -1475,10 +1444,8 @@ async function init() { el.voiceVideoBtn.onclick = toggleVideo; el.voiceScreenBtn.onclick = toggleScreenShare; - if (el.voiceFilterBtn) el.voiceFilterBtn.onclick = toggleNoiseFilter; el.voiceMuteBtn.onclick = toggleMute; el.voiceLeaveBtn.onclick = leaveVoice; - updateVoiceFilterButton(); el.addSoundBtn.onclick = () => { el.soundModal.classList.remove("hidden"); diff --git a/static/index.html b/static/index.html index c520115..de07abc 100644 --- a/static/index.html +++ b/static/index.html @@ -96,7 +96,6 @@
-