音频标签自动播放在Android浏览器中不起作用

时间:2015-06-11 17:25:53

标签: html5 audio createjs

我在启用自动播放的情况下动态创建了一个音频播放器。但它在桌面浏览器中使用不在Android浏览器中。并且progress处理程序未发送。

如果我启用controls属性并单击播放按钮,它将调度进度处理程序并播放音频。甚至我也试图通过调用play()方法手动播放。

我想在触发canplaythrough处理程序后播放音频。

1 个答案:

答案 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.

相关问题