我已经做了很多查找,并且看起来代码是正确的。我不知道从这里去哪里。它只是不记录任何东西
if(device.platform == "iPhone")
{
myFileRecord = "myrecording.wav";myMime="audio/x-wav";
document.addEventListener("deviceready", function onDeviceReady() {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS1, function fail1(){});
}, false);
var gotFS1 = function (fileSystem) {
fileSystem.root.getFile("myrecording.wav",
{ create: true, exclusive: false }, //create if it does not exist
function success(entry) {
var src = entry.toURI();
console.log(src); //logs blank.wav's path starting with file://
},
function fail1() {}
);
};
}
recordAudio();
}