收藏
回答

BackgroundAudioManager播放MP3中途报错

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug BackgroundAudioManager 客户端 7.0.4 2.6.6

- 当前 Bug 的表现(可附上截图)


- 预期表现

1:在播放音频时,在BackgroundAudioManager.onWait阶段耗费的时间过长。但是在浏览器中测试发现音频文件的加载速度并没有问题。

2:音频在播放到一半时,必定会报“音频文件错误”的错误。

console中报错信息:

weapp:///pages/debug/debug.js:30 on waiting!

debug.js:31 audio error!

debug.js:32 {src: "https://tsn.baidu.com/text2audio?tex=%25E8%25BF%25…29&cuid=ogAH25c960dWBqxYYqhRdMzLWYrU&ctp=1&lan=zh", errCode: 10001, errMsg: "errCode:67, err:decode audio fail"}errCode: 10001errMsg: "errCode:67, err:decode audio fail"src: "https://tsn.baidu.com/text2audio?tex=%25E8%25BF%2599%25E6%2598%25AF%25E6%25AF%259B%25E6%25B3%25BD%25E4%25B8%259C%25E4%25B8%25BA%25E4%25B8%25AD%25E5%2585%25B1%25E4%25B8%25AD%25E5%25A4%25AE%25E8%25B5%25B7%25E8%258D%2589%25E7%259A%2584%25E7%25BB%2599%25E4%25B8%25AD%25E5%2585%25B1%25E4%25B8%25AD%25E5%25A4%25AE%25E4%25B8%259C%25E5%258C%2597%25E5%25B1%2580%25E7%259A%2584%25E6%258C%2587%25E7%25A4%25BA%25E3%2580%2582%25E6%25AF%259B%25E6%25B3%25BD%25E4%25B8%259C%25E5%259C%25A8%25E4%25B8%25BA%25E4%25B8%25AD%25E5%2585%25B1%25E4%25B8%25AD%25E5%25A4%25AE%25E8%25B5%25B7%25E8%258D%2589%25E7%259A%2584%25E8%25BF%2599%25E4%25B8%25AA%25E6%258C%2587%25E7%25A4%25BA%25E4%25B8%25AD%25EF%25BC%258C%25E9%25A2%2584%25E8%25A7%2581%25E5%2588%25B0%25E4%25B8%259C%25E5%258C%2597%25E6%2596%2597%25E4%25BA%2589%25E7%259A%2584%25E8%2589%25B0%25E8%258B%25A6%25E6%2580%25A7%25EF%25BC%258C%25E7%25A1%25AE%25E5%25AE%259A%25E4%25BA%2586%25E4%25B8%25AD%25E5%259B%25BD%25E5%2585%25B1%25E4%25BA%25A7%25E5%2585%259A%25E5%259C%25A8%25E4%25B8%259C%25E5%258C%2597%25E7%259A%2584%25E4%25BB%25BB%25E5%258A%25A1%25E6%2598%25AF%25E5%259C%25A8%25E8%25B7%259D%25E7%25A6%25BB%25E5%259B%25BD%25E6%25B0%2591%25E5%2585%259A%25E5%258D%25A0%25E9%25A2%2586%25E4%25B8%25AD%25E5%25BF%2583%25E8%25BE%2583%25E8%25BF%259C%25E7%259A%2584%25E5%259F%258E%25E5%25B8%2582%25E5%2592%258C%25E5%25B9%25BF%25E5%25A4%25A7%25E4%25B9%25A1%25E6%259D%2591%25EF%25BC%258C%25E5%25BB%25BA%25E7%25AB%258B%25E5%25B7%25A9%25E5%259B%25BA%25E7%259A%2584%25E6%25A0%25B9%25E6%258D%25AE%25E5%259C%25B0%25EF%25BC%258C%25E5%258F%2591%25E5%258A%25A8%25E7%25BE%25A4%25E4%25BC%2597%25EF%25BC%258C%25E9%2580%2590%25E6%25AD%25A5%25E7%25A7%25AF%25E8%2593%2584%25E5%258A%259B%25E9%2587%258F%25EF%25BC%258C%25E5%2587%2586%25E5%25A4%2587%25E5%259C%25A8%25E5%25B0%2586%25E6%259D%25A5%25E8%25BD%25AC%25E5%2585%25A5%25E5%258F%258D%25E6%2594%25BB%25E3%2580%2582&tok=24.f4a7382a79d51d6a303e75dfcec0ef23.2592000.1558171770.282335-16033429&cuid=ogAH25c960dWBqxYYqhRdMzLWYrU&ctp=1&lan=zh"__proto__: Object

3:该接口在开发工具中是正常可用的,并且使用InnerAudio接口在开发工具和真机上也是正常可用的。

- 复现路径

代码片段在手机上打开后等待即可。


- 提供一个最简复现 Demo

如代码片段

最后一次编辑于  2019-04-24
回答关注问题邀请回答
收藏

1 个回答

  • 晓贰丑
    晓贰丑
    2019-06-04

    我也遇到同样的问题了


    2019-06-04
    有用
    回复
登录 后发表内容