javascript – 如何在iOS上自动播放HTML5和标签?


The question is: What other option is there to make it autoplay ?

我正在考虑使用带有iOS API调用的集成浏览器的原生应用来模拟触摸/点击,从而使视频/音频标签自动播放.




Safari HTML5 Audio and Video Guide

In Safari on iOS (for all devices, including iPad), where the user may be on a cellular network and be charged per data unit, preload and autoplay are disabled. No data is loaded until the user initiates it. This means the JavaScript play() and load() methods are also inactive until the user initiates playback, unless the play() or load() method is triggered by user action. In other words, a user-initiated Play button works, but an onLoad=”play()” event does not.

这播放电影:< input type =“button”value =“Play”onclick =“”>

这在iOS上没有任何作用:< body onload =“”>

转载注明原文:javascript – 如何在iOS上自动播放HTML5和标签? - 代码日志