使用wx.getRecorderManage进行录音管理 调用开始录音接口时 有时会报错 无发录音 错误信息为
errMsg: “operateRecorder: fail recorder not start”
innerAudioContext.onStop( this .handleVoiceStop) innerAudioContext.onEnded( this .handleVoiceStop) recorderManager.onStop( this .handleStop) recorderManager.onStart( this .handleStart) recorderManager.onError((res) => { wx.showModal({ title: '提示' , content: '录音的姿势不对!再试一次' , showCancel: false }) console.log( '出错了' ) console.log(res); }) |
我在onLoad周期中设置了录音的事件innerAudioContext.onStop(this.handleVoiceStop) innerAudioContext.onEnded(this.handleVoiceStop) recorderManager.onStop(this.handleStop) recorderManager.onStart(this.handleStart) recorderManager.onError((res) => { wx.showModal({ title: ‘提示’, content: ‘录音的姿势不对!再试一次’, showCancel: false }) console.log(‘出错了’) console.log(res); })