问题
I have gotten audio recording to work on Phonegap 3.0, however depending on the platform it launches a custom interface that facilitates the recording.
Is there a way to not show the interface but use a custom interface?
回答1:
Answer:
Instead of using the capture API, use the media api.
function recordAudio() {
var src = "myrecording.mp3";
var mediaRec = new Media(src,
// success callback
function() {
console.log("recordAudio():Audio Success");
},
// error callback
function(err) {
console.log("recordAudio():Audio Error: "+ err.code);
});
// Record audio
mediaRec.startRecord();
}
来源:https://stackoverflow.com/questions/18542547/capture-audio-phonegap-3-0-without-interface