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: '结束'
});
},
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。