调用了getRecorderManager功能,同时触发打电话makePhoneCall,IOS有recorderManager.onInterruptionBegin 、 recorderManager.onInterruptionEnd回调,安卓却没有
callMobile() { const that = this this.record() wx.makePhoneCall({ phoneNumber: '19999999999', success(res) { console.log(11) }, fail() { console.log('fail') that.recorderManager && that.recorderManager.stop() } }) }, initAudio() { const that = this that.recorderManager = wx.getRecorderManager() that.recorderManager.onError((err) => { console.log('error...', err) console.log('erro ++ that.recorderManager', that.recorderManager) that.recorderManager.stop() }) that.recorderManager.onStart(() => { console.log('onStart...') }) that.recorderManager.onStop(() => { console.log('onStop...') }) that.recorderManager.onPause(() => { console.log('onPause...') }) that.recorderManager.onInterruptionBegin(() => { console.log('1录音开始中断了....') }) that.recorderManager.onInterruptionEnd(() => { console.log('2录音已经恢复成功...') that.recorderManager.stop() }) }, record() { const that = this const options = { duration: 600000, sampleRate: 16000, format: 'mp3' } console.log('that.recorderManager',that.recorderManager) if(!that.recorderManager){ that.initAudio() } that.recorderManager.start(options) }, |
IOS可以
安卓却没有onInterruptionBegin\onInterruptionEnd回调
在APP.JS里设置(IOS、安卓)都没有回调效果
wx.onAudioInterruptionEnd(() => { console.log('录音已经恢复成功....') }) wx.onAudioInterruptionBegin(() => { console.log('录音开始中断了....') }) |

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)