收藏
回答

InnerAudioContext(iOS真机调试报错)?

InnerAudioContext(iOS真机调试报错)

column: 840045

line: 1

message: "undefined is not an object (evaluating 'r.failCallbacks')"

sourceURL: "https://lib/WAServiceMainContext.js"

stack: "@https://lib/WAServiceMainContext.js:1:840045"

play() {
    clearInterval(this.data.exercise_timer);
    const file = this.data.curExercise.audio.file;
    innerAudioContext.src = file;
    innerAudioContext.onPlay(() => {
      clearInterval(this.data.audio_timer);
      let duration = Math.floor(innerAudioContext.duration) * 1000;
      console.log('播放中');
      this.data.audio_timer = setInterval(() => {
        innerAudioContext.seek(0);
        if (this.data.audio_status === '播放') return;
        console.log("audio_timer / 104 => ", this.data.audio_timer);
      }, duration);
    });
    innerAudioContext.play();
    this._timer();
    this.setData({
      audio_status: '结束'
    });
  },
回答关注问题邀请回答
收藏

1 个回答

  • Demons
    Demons
    2022-11-27

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2022-11-27
    有用
    回复 1
    • Qiu (吉²)
      Qiu (吉²)
      2022-11-27
      换了基础库就好了
      2022-11-27
      回复
登录 后发表内容