主体代码一下,请问各位大牛如何解决该问题,目前重启应用就可以录音。
conf.recorder= plus.audio.getRecorder();
if (conf.recorder == null) {
HC.msg("请设置允许APP录音!");
return;
}
obj.is_doing= true;
startTimestamp = (new Date()).getTime();
conf.recorder.record({
filename: "_doc/audio/",
format: 'arm'
}, function(path) {
if( conf.recordCancel== true){
return false;
}
onSuccess( {path:path,time:parseInt(0.5+(stopTimestamp - startTimestamp)/1000) ,ext:conf.format });
}, function(e) {
HC.msg("录音时出现异常: " + e.message);
});
0 个回复