Skip to content

Implement soft mute that doesn't affect system audio chain#877

Open
mr-byrd wants to merge 1 commit intocommetchat:mainfrom
mr-byrd:soft-mute
Open

Implement soft mute that doesn't affect system audio chain#877
mr-byrd wants to merge 1 commit intocommetchat:mainfrom
mr-byrd:soft-mute

Conversation

@mr-byrd
Copy link
Copy Markdown

@mr-byrd mr-byrd commented Apr 7, 2026

  • Replace LiveKit's setMicrophoneEnabled(false) with setVolume(0) to mute audio at the WebRTC mixer level instead of disabling the audio track
  • This prevents the microphone device from being released at the device level, keeping it available for other applications
  • This fixes issues such as disabling the microphone in commet and leaving a session keeps the microphone disabled for other applications until the device is re-enabled either in commet or some other mechanism
  • Disable audio level visualizer border when local user is muted to prevent misleading feedback
  • Use local _softMuted state tracker combined with updateMuted() to signal mute state to LiveKit server to notify other users that the current user is muted through the LiveKit event without stopping the capture device

- Replace LiveKit's setMicrophoneEnabled(false) with setVolume(0) to
  mute audio at the WebRTC mixer level instead of disabling the audio track
- This prevents the microphone device from being released at the
  device level, keeping it available for other applications
- This fixes issues such as disabling the microphone in commet and
  leaving a session keeps the microphone disabled for other applications
  until the device is re-enabled either in commet or some other mechanism.
- Disable audio level visualizer border when local user is muted to prevent misleading feedback
- Use local _softMuted state tracker combined with updateMuted() to signal mute state to LiveKit server without stopping the capture device
@Airyzz
Copy link
Copy Markdown
Contributor

Airyzz commented Apr 8, 2026

Thank you! would you mind trying to implement the same for the p2p calls which dont use livekit?

Also I think it would be a good idea to have an option in preferences to revert to use previous implementation just in case this introduces anything unexpected

@mr-byrd
Copy link
Copy Markdown
Author

mr-byrd commented Apr 9, 2026

Sure, I can make it a preference and I'll look into the doing this for p2p as well.

Seeing as how LiveKit and the p2p implementation will be different I think it would be good to have them as separate toggles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants