iOS: Requests access to users microphone when only instantiating a remote stream, with odd side effects
See original GitHub issueWe’re using React Native WebRTC in an iOS only app at the moment. It streams a remote stream (instantiated via Node Janus) and does not need a local stream, so we don’t call getUserMedia
anywhere in the codebase.
This is a simplified outline of our component.
We’re experiencing the following unexpected behaviour:
- When the stream starts, the user is prompted to grant the application microphone access
- For the duration of that stream, regardless of whether they accept or decline mic access, there is no speaker audio (from
InCallManager
) - Once the Player component unmounts (or the user is removed from the remote session) the audio continues to play (the video stream ends as expected)
On the second stream:
- If the user granted microphone access, the application then behaves as we would expect
- If the user did not grant the mic permission, the issues above continue to occur
As we’re neither calling getUserMedia
nor instantiating any kind of local stream, I’m struggling to work out where the request for microphone access is coming from. It’s very much undesirable as security conscious users will not grant it, and then experience the playback bugs above.
Looking around the code, could this be the cause? https://github.com/oney/react-native-webrtc/blob/master/ios/RCTWebRTC/WebRTCModule%2BRTCMediaStream.m#L435
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:16 (7 by maintainers)
Top GitHub Comments
Experiencing the same thing, any workaround?
Microphone permissions are requested by Google’s WebRTC iOS library. Related bug report is here: https://bugs.chromium.org/p/webrtc/issues/detail?id=5873 As you can see from the thread, WebRTC devs are not willing to fix this issue and closed the ticket. Workaround with
useManualAudio
will disable ALL audio, both incoming and outgoing, so won’t help in this situation.