innerAudioContext 安卓很长时间后才会播放,或者根本就没有声音
initReadPlugin: function () {//初始化,播放插件innerAudioContext.onWaiting(() => {debugger});innerAudioContext.onCanplay(() => {debugger});innerAudioContext.onPlay(() => {debugger});innerAudioContext.onPause(() => {});innerAudioContext.onEnded(() => {// debugger// console.log("播放自然结束");});innerAudioContext.onError((res) => {})},//filename 为 语音合成插件了返回的地址,经测试是正常的 innerAudioContext.autoplay = true innerAudioContext.src = res.filename; |
预期:
当下面两行代码执行后,应该有语音播放出来,
innerAudioContext.autoplay = true innerAudioContext.src = res.filename;bug:
苹果机正常播放,安卓机要很长时间才会播放,或者是根本没有声音(安卓机时,很慢才会到play等的监听事件,有时候到了stop事件,也没有声音)
