馃憢 Hello!
Thank you for this great library! Really solved all our issues.
馃 PROBLEM:
We're using this library along with react-native-video and react-native-sound, and when we record, the volume is going down. This wouldn't be such a great deal, but it gets stuck at a lower level.
猸愶笍 SOLUTION
Followed this solution https://stackoverflow.com/a/27020411/14056591
Applied it here (line 33 and 38):
https://github.com/xiqi/react-native-live-audio-stream/blob/master/ios/RNLiveAudioStream.m#L33
https://github.com/xiqi/react-native-live-audio-stream/blob/master/ios/RNLiveAudioStream.m#L38
Changed AVAudioSessionCategoryOptionDuckOthers to AVAudioSessionCategoryOptionDefaultToSpeaker
This would be the diff:
--- a/node_modules/react-native-live-audio-stream/ios/RNLiveAudioStream.m
+++ b/node_modules/react-native-live-audio-stream/ios/RNLiveAudioStream.m
if (@available(iOS 10.0, *)) {
success = [audioSession setCategory: AVAudioSessionCategoryPlayAndRecord
mode: AVAudioSessionModeVoiceChat
- options: AVAudioSessionCategoryOptionDuckOthers |
+ options: AVAudioSessionCategoryOptionDefaultToSpeaker |
AVAudioSessionCategoryOptionAllowBluetooth |
AVAudioSessionCategoryOptionAllowAirPlay
error: &error];
} else {
- success = [audioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions: AVAudioSessionCategoryOptionDuckOthers error: &error];
+ success = [audioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions: AVAudioSessionCategoryOptionDefaultToSpeaker error: &error];
success = [audioSession setMode: AVAudioSessionModeVoiceChat error: &error] && success;
}
if (!success || error != nil) {
This issue body was partially generated by patch-package.
馃憢 Hello!
Thank you for this great library! Really solved all our issues.
馃 PROBLEM:
We're using this library along with react-native-video and react-native-sound, and when we record, the volume is going down. This wouldn't be such a great deal, but it gets stuck at a lower level.
猸愶笍 SOLUTION
Followed this solution https://stackoverflow.com/a/27020411/14056591
Applied it here (line 33 and 38):
https://github.com/xiqi/react-native-live-audio-stream/blob/master/ios/RNLiveAudioStream.m#L33
https://github.com/xiqi/react-native-live-audio-stream/blob/master/ios/RNLiveAudioStream.m#L38
Changed
AVAudioSessionCategoryOptionDuckOtherstoAVAudioSessionCategoryOptionDefaultToSpeakerThis would be the diff:
This issue body was partially generated by patch-package.