这是 Apple 特意这样设计的,不允许自动播放,必须由用户触发播放行为。主要考虑到用户可能不是WiFi网络,而音频通常较大,会耗费很多流量,流量是要花钱的。
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.
这是 Apple 特意这样设计的,不允许自动播放,必须由用户触发播放行为。主要考虑到用户可能不是WiFi网络,而音频通常较大,会耗费很多流量,流量是要花钱的。
请参考 https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html