我在启用自动播放的情况下动态创建了一个音频播放器。但它在桌面浏览器中使用不在Android浏览器中。并且progress
处理程序未发送。
如果我启用controls
属性并单击播放按钮,它将调度进度处理程序并播放音频。甚至我也试图通过调用play()
方法手动播放。
我想在触发canplaythrough
处理程序后播放音频。
答案 0 :(得分:2)
Audio on mobile devices often requires a user event (click / touch) in order to play, which seems to be what is happening in your case.
You can check out the SoundJS Mobile Safe Tutorial to learn more about the issue and a couple of ways to work around it.
Hope that helps.