fix: synchronize microphone mute state

This commit is contained in:
illusia committed 2026-09-18 17:06:30 +08:00
1 parent fae21ec086
commit bcf212738b
6 files changed
+35 -8

No files matched your search

+1 -1
View File
@@ -1878,7 +1878,7 @@ export function useVoiceWebSocket() {
accumLen = 0;
if (webrtcActive.value) micStream?.getAudioTracks().forEach((track) => { track.enabled = !muted; });
if (webrtcMixMicGain) webrtcMixMicGain.gain.value = muted ? 0 : inputVolume.value;
if (webrtcActive.value) sendCmd("setMicrophoneMuted", { muted });
sendCmd("setMicrophoneMuted", { muted });
if (muted && state.tsClientId) clearSpeaking(state.tsClientId);
void saveAudioPreferences();
}