Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17233

Low volume when using AVAudioSessionCategoryPlayAndRecord

$
0
0

I am developing a react native app and encountering a problem with sound on iOS.

This app is a video conferencing app that play sounds during the meeting. For this, I use video-sdk which is build on top of web-rtc and react-native-track-player for sound playback.

My problem has to do with the management of the audio session.When playing sound with react-native-track-player, I have the ability to choose the AVAudioSessionCategory and Options. With AVAudioSessionCategoryPlayback, I have no volume problem. But I can't record and play sound at the same time during the meeting. However when using AVAudioSessionCategoryPlayAndRecord, the sound is super low.

I tried to activate DefaultSpeaker, MixWithOthers and basically tried every combinaison of categories and modes possible, without success.

I also tried to modify the native code of video-sdk to add MixWithOthers everywhere.And I also took a look at the code of react-native-web-rtc, which use AudioCaptureSession. I don't know if it interferes with the sound but I found the following option in the Apple docs.https://developer.apple.com/documentation/avfaudio/avaudiosession/2186370-setaggregatediopreference?language=objc

So basically, I'd like to know how to make all these AudioSession and CaptureSession work together to be able to play sound at full volume during a meeting.

I have very little knowledge of iOS development, so some things may be obvious for you, but not for me. So I am welcoming every insights :)

Thank you !


Viewing all articles
Browse latest Browse all 17233

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>