bindtouchstart后会授权弹窗怎么处理
发布于 5 年前 作者 xiexiulan 18203 次浏览 来自 问答

bindtouchstart  开始录音

bindtouchend   结束录音

当第一次点击 bindtouchend时,会弹出授权窗口,但bindtouchstart还在执行,会导致录音出错,用户体验也不好,有什么办法吗?

1 回复

我想到了个办法。

onLoad的时候先让他执行wx.startRecord();  授权后再暂停录音

    wx.startRecord();

    setTimeout(function () {

      //结束录音  

      wx.stopRecord()

    }, 1000);

但还没点击确定授权的时候。  setTimeout却执行了。。。

回到顶部