react-native-audio-recorder-player
                                
                                
                                
                                    react-native-audio-recorder-player copied to clipboard
                            
                            
                            
                        setVolume occurs error in iOS
Version of react-native-audio-recorder-player
^3.5.0 and 3.3.4
Version of React Native
0.68.1
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
I tried to record sound using this library but the recorded sound volume was so low. So I tried to set volume 1.0 manually this way.
const startRecording = async () => {
const audioSet: AudioSet = {
  AVFormatIDKeyIOS: AVEncodingOption.aac,
  AVNumberOfCHannelsKeyIOS: 2,
  AVEncoderAudioQualityKeyIOS: AVEncoderAudioQualityIOSType.max,
  AVModeIOS: AVModeIOSOption.measurement
}
await recordingObj.startRecorder(undefined, audioSet);
await recording.setVolume(1.0); //here
}
Actual behavior
By the way, when trying to run on the real device (iOS 15.4.1), then it occurs error from swift code.
It was only compiled successfully without setVolume function.
fatal error unexpectedly found nil while implicitly unwrapping an optional value

Regards,
Currently, the volume should be set after playing audio. I think this is a good issue though. I'll think about this.
@hyochan i am facing the same issue, any update on this?
@hyochan hello, we have put the rule if audio is not playing, we have disabled setting the volume. however this is not the user experience which audio player users of mobile devices used to use. so is there any way for us to 'fool the system' which would help us to setVolume even if an user is not playing audio.