提交 71dc5171 编写于 作者: 辛宝Otto's avatar 辛宝Otto 🥊

Merge branch 'master' into 'master'

Update audio-context.md - 增加 音频组件偶现-99错误码问题的解决方案

See merge request !172
......@@ -98,7 +98,19 @@ innerAudioContext.onError((res) => {
console.log(res.errCode);
});
```
**当出现-99错误时**
```javascript
// 多次会调用播放新的文件时,提前销毁实例,可避免-99错误
if (innerAudioContext) {
try {
innerAudioContext.pause();
innerAudioContext.destroy()
innerAudioContext = null
} catch (e) {
//TODO handle the exception
}
}
```
**tips**
- 如需音频的倍速播放,可通过video的倍速播放替代实现。插件市场有封装好的插件[音频倍速播放](https://ext.dcloud.net.cn/search?q=%E9%9F%B3%E9%A2%91%E5%80%8D%E9%80%9F%E6%92%AD%E6%94%BE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册