How to release mic while on WebRTC call?

When I’m on a WebRTC call, my mic is locked and I can’t use it on another app. Is there a way to free this mic usage? For example, I’m on WebRTC call but want to send a WhatsApp audio message.

With the older version of WebRTC I just used the removeStream method f and it works. But I can’t do it with the removeTrack method, because for some reason my call is over by the server.

Is there an alternative? Thanks!

Have you tried just disabling the track rather than removing it?
Surely to keep the connection open you can do something like create data channels?
Not entirely sure how you are going about things though.

If you are talking about track.enabled = false, it doesn’t work, unfortunately. I’m using Janus Server with Audiobridge. I’m struggling with releasing the mic while it’s not being used - it’s a PTT application - so the others apps can use it (WhatsApp audio message, for example).

Sounds more like we’d need to implement direct control over usage of the microphone so it can be acquired and released on demand.

Might be out of scope.