element-hq / element-call

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

Expose methods for controling the mute state #2480

Closed stefanceriu closed 1 month ago

stefanceriu commented 1 month ago

Your use case

What would you like to do?

Programatically mute or unmute the microphone.

Why would you like to do it?

So that we can sync the mute state between EC and CallKit

How would you like to achieve it?

Expose 2 new javaScript methods that the embedding client can call to 1) mute/unmute the call 2) read the current mute state

Have you considered any alternatives?

Tried finding the button based on one of it's properties and clicking it but that's fragile. Also, reading the mute state from the media device's audio track doesn't really work, presumably the track itself isn't muted.

Additional context

Useful for implementing https://github.com/element-hq/element-x-ios/issues/3050

toger5 commented 1 month ago

I will try to work on this. (Starting my day with doing reviews however)

toger5 commented 1 month ago

This happened in https://github.com/element-hq/element-call/pull/2482