ios录音时,返回前一个页面卡死。
问题展示:首先有页面a、b
步骤1:从a页面打开b;
步骤2:在b页面开启录音功能 录制音频。
步骤3:单击返回a页面时,停止录音,并返回。
步骤4:bug(整个页面出现卡死现象,而且点击无效果,只能强制退出软件)
代码片段:
var recorderObj = null;
document.addEventListener("plusready",function(){
//创建录音对象
recorderObj = plus.audio.getRecorder();
});
开启录音:
recorderObj.record({filename:"_doc/audio/",format:"amr"},function(recordFile){
console.log("---------录音文件路劲------"+recordFile);
},function(e){
console.log(JSON.stringify(e)+"-----录音报错------"+e.message);
});
点击返回并停止录音:
recorderObj.stop(); //停止录音
plus.webview.currentWebview().close("auto"); //关闭页面
1 个回复
bughunter - 先挣一个亿
请问在停止录音和关闭页面之间做了其他的操作,也会卡死吗?谢谢