简体   繁体   中英

What format should I record in android to play in ios

Im building an application where Im using cordova media to record audio on both ios and android. I encode the audio to a base64 string and send it to a server (parse.com) and save it as a file. When I want to play it, I play the url from the file after I click on a button on the devices. When I record the audio as a wav file on ios I can play it on both ios and android. But when I record on android I can only play it back on android devices.

Im struggling to find a format which I can record on android and play it on ios. I have tried wav, mp3, mp4, aac and 3gp. I have tried amr as well, but then it looks like it download the file to the phone and that is not what I want to do.

Can someone please help, Im really lost here.

Here's what I used. It plays audio properly in iOS.

    recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
    recorder.setAudioSamplingRate(44100);
    recorder.setAudioEncodingBitRate(96000);
    recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM