@@ -100,13 +100,19 @@ export const AudioRecorder = ({
100
100
const dirs = RNFetchBlob . fs . dirs ;
101
101
const path = Platform . select ( {
102
102
ios : `audio-${ localRecordedAudioCacheFilePaths . length } .m4a` ,
103
- android : `${ dirs . CacheDir } /audio-${ localRecordedAudioCacheFilePaths . length } .mp3 ` ,
103
+ android : `${ dirs . CacheDir } /audio-${ localRecordedAudioCacheFilePaths . length } .aac ` ,
104
104
} ) ;
105
105
106
106
ARPlayer . startRecorder ( path , {
107
107
AVFormatIDKeyIOS : AVEncodingOption . aac ,
108
108
AVNumberOfChannelsKeyIOS : 2 ,
109
109
AVSampleRateKeyIOS : 44100 ,
110
+ AudioSourceAndroid : 1 , // MIC
111
+ OutputFormatAndroid : 6 , // AAC_ADTS
112
+ AudioEncoderAndroid : 3 , // AAC
113
+ AudioSamplingRateAndroid : 16000 ,
114
+ AudioEncodingBitRateAndroid : 128000 ,
115
+ AudioChannelsAndroid : 2 ,
110
116
} )
111
117
. then ( ( value : string ) => {
112
118
if ( value ) {
@@ -148,9 +154,9 @@ export const AudioRecorder = ({
148
154
return {
149
155
uri : finalPath ,
150
156
originalPath : finalPath ,
151
- type : 'audio/mp3 ' ,
152
- fileName : `audio-${ localRecordedAudioCacheFilePaths . length } .mp3 ` ,
153
- name : `audio-${ localRecordedAudioCacheFilePaths . length } .mp3 ` ,
157
+ type : 'audio/aac ' ,
158
+ fileName : `audio-${ localRecordedAudioCacheFilePaths . length } .aac ` ,
159
+ name : `audio-${ localRecordedAudioCacheFilePaths . length } .aac ` ,
154
160
fileSize : stats . size ,
155
161
} ;
156
162
}
0 commit comments