iPhone webRTC / getUserMedia only uses headset mic with low volume. Can we change mics?

Hi hope all are well!

We've been working on a live streaming app and it's going quite well! Just got the aspect ratio locked as desired.

Now the audio, its volume is extremely low. It sounds like it's using the headset mic instead of the bottom mic that's used on Facetime or on speakerphone calls.

We tried flipping cameras and specifying sample rates, almost every constraint in MediaConstraints - no go!

Is there any way to specify this?

Thanks in advance!

Replies

this issue is probably from AVAudioSession try this

AVAudioSession.sharedInstance().setCategory(.playback // or what you need)