element-hq / element-call

Group calls powered by Matrix
https://call.element.io
GNU Affero General Public License v3.0
585 stars 89 forks source link

Muting audio no longer turns off audio capture. #2568

Closed ara4n closed 3 weeks ago

ara4n commented 2 months ago

Steps to reproduce

  1. Press the mute button
  2. See that the webapp is still capturing audio - e.g. on macOS/iOS: Screenshot 2024-08-16 at 10 36 55
  3. Worry whether the mute button is actually working or not.
  4. I /think/ we used to stop capturing audio while muted, to be more reassuring?

This is fairly low priority, but am flagging it more because it's slightly surprising me.

Outcome

What did you expect?

Audio should not be captured when you are muted.

What happened instead?

App keeps capturing audio despite being muted.

Operating system

macOS

Browser information

Chrome 127

URL for webapp

call.element.io

Will you send logs?

No

robintown commented 2 months ago

There probably was a point back in the full mesh era when this behavior was different, but I believe we've been forcing the microphone track on for about a year now. The reason is here in this comment:

https://github.com/element-hq/element-call/blob/69b762b9eda9d88ccdb3e0b75e7d47f3ca0e2a57/src/livekit/useECConnectionState.ts#L68-L71

For example I think I remember that keeping the microphone track is what enables iOS to keep the call going when the browser is backgrounded. As a sanity check I just went through Zoom, Teams, Discord, and Jitsi, and it appears that all of them but Jitsi exhibit this same behavior when you mute. The Web platform just doesn't give us a better way to separate the intent to potentially share audio from whether audio actually gets captured, at the moment.

toger5 commented 3 weeks ago

As robin describes this a behavior we intentionally decided to fix various issues: