wx.createInnerAudioContext() 安卓真机无法使用

发布于 8 年前作者 xiangchao4083 次浏览最后编辑 8 年前来自 ask
  • 当前 Bug 的表现(可附上截图)
  • 预期表现

执行:console.log(‘开始播放’);

  • 复现路径

  • 提供一个最简复现 Demo

let that = this;

let innerAudioContext = wx.createInnerAudioContext(); //创建播放实例

this.data.innerAudioContext = innerAudioContext;

// innerAudioContext.src = card.userVoice;

innerAudioContext.src = http://testflly.hulelive.com/feimatroot/aaa.mp3;

innerAudioContext.play();

innerAudioContext.onPlay(() => {

console.log(‘开始播放’);

that.setData({

playStop: 1

})

that.playTime();

});

innerAudioContext.onError((res) => {

console.log(‘播放错误’, res);

that.setData({

playStop: 0

})

})

7 回复
jxiao
jxiao1 楼6 年前

同问,遇到了一模一样的问题,楼主解决了吗

jing58
jing582 楼6 年前

+1

ihan
ihan3 楼6 年前

+1

jing24
jing244 楼6 年前

10004指的是格式错误,先检查下是不是格式问题

yan91
yan915 楼6 年前

我使用audio播放时没问题的,但用wx.createInnerAudioContext() 就一直报这个错了

xuechao
xuechao6 楼6 年前

我也是遇到了这个问题

jingfan
jingfan7 楼6 年前

请问您解决了吗,我现在报的和您一样的错,安卓真机播放不了,ios没问题。音频格式是mp3