急!急!急!多个音频会同时播放?
发布于 5 年前 作者 jma 15206 次浏览 来自 问答

我是一个数组里边有三个音频文件,我需要依次播放结果三个音频会同时播放

let arr = [‘http://test.eyecome.cn/yinxiao1323.mp3’,‘http://test.eyecome.cn/voice_buffer.mp3’,‘http://test.eyecome.cn/text2audio.mp3’]

      for(let i of arr){

          let InnerAudioContext = wx.createInnerAudioContext();

          InnerAudioContext.src = i;

          InnerAudioContext.play();

          console.log(i)

      }

已解决,使用了个递归函数。

https://developers.weixin.qq.com/community/develop/article/doc/0004ead0d0c9a097226b1cdef5d013

2 回复

判断下每个的播放状态,结束后再下一条

回到顶部