question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS: Requests access to users microphone when only instantiating a remote stream, with odd side effects

See original GitHub issue

We’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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
jiantongccommented, Feb 11, 2019

Experiencing the same thing, any workaround?

4reactions
sesmcommented, Oct 6, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Requesting Authorization for Media Capture on iOS
Respect user privacy by seeking permission to capture and store photos, audio, and video.
Read more >
iOS check if application has access to microphone
I have tested this code with iOS 8 for the purpose of checking for microphone permission and obtaining the current state.
Read more >
iOS Player settings - Unity - Manual
Select which devices the app targets. The options are iPhone Only, iPad Only, and iPhone + iPad. Target SDK, Select which SDK the...
Read more >
Fix It: When iPhone Won't Allow Apps Access to Your Photos
Login to Instagram, and take a photo. Follow prompts to allow access to your camera and photos. Microphone and location can be allowed...
Read more >
How to know when your phone's camera or mic is being used.
You can choose which apps you want to deny the camera or microphone permissions. Some, like a video chat app, will need full...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found