How to set the Mime Type when audio recording

Please provide the following:

  1. SDK Version: 41
  2. Platforms: Android
  3. expo-av

I use expo-av^9.2.3 and try to record audio using this library.

This is the config and some codebase.

let temp = {
        android: {
        audioEncoder: 3,
        bitRate: 128000,
        extension: ".wav",
        numberOfChannels: 1,
        outputFormat: 2,
        sampleRate: 44100,
   },
       ios: {
         audioQuality: 127,
         bitRate: 128000,
         extension: ".caf",
         linearPCMBitDepth: 16,
         linearPCMIsBigEndian: false,
         linearPCMIsFloat: false,
         numberOfChannels: 2,
         sampleRate: 44100,
       },
       isMeteringEnabled: true,
    };

const { recording } = await Audio.Recording.createAsync(temp);

I tried to save this file on the local and the file extension was .wav.

This is the example of local uri.
file:///storage/emulated/0/Music/recording-65108702-4e32-4c79-a3f5-a2a0ea3053f6.wav

But when checking the metadata of this file, I see its file type is .mp4.

Are there any way to get only .wav file?

Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.