wx.createInnerAudioContext() ios播放失败
发布于 5 年前 作者 luming 10867 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

ios真机播放失败;浏览器,安卓真机,开发工具可以正常播放

报错信息如下

http://xm.sljy.com//assets/img/ZT001/spk/analRec/ZT001S01/2017-03-05rJIJ.mp3  、

有的地址是可以正常播放的,这个在ios上就播放不了

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

const innerAudioContext = wx.createInnerAudioContext()

innerAudioContext.autoplay = true

innerAudioContext.src = http://xm.sljy.com//assets/img/ZT001/spk/analRec/ZT001S01/2017-03-05rJIJ.mp3

innerAudioContext.onPlay(() => {

console.log(‘开始播放’)

})

innerAudioContext.onError((res) => {

console.log(res.errMsg)

console.log(res.errCode)

})

2 回复

麻烦提供出现问题的机型和微信版本,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

代码片段中的 音频链接在 ios真机上播放失败;开发工具,浏览器,安卓机都可以正常播放

回到顶部