定时器中访问 InnerAudioContext.duration 开发工具卡死

发布于 8 年前作者 twu6190 次浏览最后编辑 8 年前来自 ask
  • 当前 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);

}

1 回复