In my app, I have multiple open peer connections and I want to be able to mute the microphone on the peer connection level, not globally (as is done here).
Chrome is straightforward:
- Call removeStream when muting
- Call addStream when unmuting
Negative: I understand that we are moving towards a addTrack/removeTrack world, so this solution is not compatible with other browsers and the future.
Firefox does not work at all:
- removeTrack/addTrack requires renegotiation, which is not acceptable, as it takes time
- replaceTrack does not require renegotiation and my idea would be to have an empty MediaStreamTrack for mute that I could use to replace the former MediaStreamTrack. Any idea how to do that?
Alternatively, any ideas on a viable Firefox solution / a cooler Chrome solution / a unified approach?