收藏
回答

微信小程序安卓端手机touchstart事件长按无法触发录音开始事件?

出现问题的手机型号:HUAWEI-LLD-AL20

运行系统:28

微信版本:7.0.8

基础库:2.9.4

问题具体描述:在绑定了touchstart、touchmove、touchend等事件的view上,长按时,无法在事件touchstart中触发录音开始,而点击时却可以。

其他通过机型:iphone6s iphonexr oneplus7

代码片段:

// touchstart事件绑定

voiceBegin(e) {

if (e.touches.length > 1) {

return;

}

this.initPoint.Y = e.touches[0].clientY;

this.initPoint.identifier = e.touches[0].identifier;

this.RECORDER.start({

format: "mp3"

}); //录音开始,

},

//录音开始事件监听

this.RECORDER.onStart((e) => {

console.log('this.RECORDER.onStart');  //  长按时,无法在事件touchstart中触发录音开始,而点击时却可以。

this.recordBegin(e);

})


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签