0

im using build.phonegap , and i want to record Audio then upload audio file to server .

i have seen the following code to record MP3:

function recordAudio() {
var src = "myrecording.mp3";
var mediaRec = new Media(src,
 function() {            console.log("recordAudio():Audio Success");    
    },

 // error callback        function(err) {   
         console.log("recordAudio():Audio Error: "+ err.code);      
  });

  // Record audio    mediaRec.startRecord();}

======================================================================================

this is for recording media file , now how i can upload this file to server ??

i have seen phonegap example to upload file to server , but this example explain how to upload images from camera to server not mp3 file , but i want to know how i can upload this mp3 file direclty to server .

and please i want to know :

"myrecording.mp3" file will saved inside my application ????

4

1 回答 1

0

看看这个线程:如何使用phonegap将mp3文件上传到服务器(xxampp)。?

这导致您:http ://docs.phonegap.com/en/1.0.0/phonegap_file_file.md.html#FileTransfer

于 2012-10-12T19:54:36.290 回答