定时器中访问 InnerAudioContext.duration 开发工具卡死
发布于 6 年前 作者 twu 6053 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

微信web开发者工具运行卡顿,甚至卡死;

  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

refreshlrc:function(){

this.innerAudioContext= wx.createInnerAudioContext();

var that = this;

this.timer = setInterval(function () {

//播放结束,取消刷新

if (that.currentTime > that.innerAudioContext.duration * 1000) {

clearInterval(that.timer);

}

}, 1000 / 60);

}

回到顶部