How to play an audio file recorded with Media Recorder in a browser?

I am using Android Media Recorder to record audio. The code works fine. Audio is recorded and played on the device. I am setting the output format for an audio file as THREE_GPP and Audio encoder as DEFAULT. These files are not playable in the browser and this is my actual requirement. I think SetAudioEncoder is giving me problems. I tried to install another encoder which is AMR_NB but still the same problem. I have installed a flash player but no luck. I am using android-sdk 8. Is there any way that I can play the files in the browser.

Any help would help. Thanks in advance.

+3


source to share


1 answer


 _recorder.Reset();
                _recorder.SetAudioSource(AudioSource.Mic);               
                _recorder.SetOutputFormat(OutputFormat.Mpeg4);
                _recorder.SetAudioEncoder(AudioEncoder.HeAac);
                _recorder.SetAudioChannels(1);
                _recorder.SetAudioSamplingRate(44100);
                _recorder.SetAudioEncodingBitRate(96000);
                _recorder.SetOutputFile(MediaPath.tempDir + Java.IO.File.Separator + File_Name);

      



0


source







All Articles