Because IOS Safari restrictions do not allow audio AutoPlay, users must actively interact (for example, click) to play audio, so we actively play audio with a user interaction event.
This pit is believed to have been stepped on, and before IOS 9 appeared, such a hack scheme was still well-established.
But when IOS 9 appeared, it found that the solution was "dead".
There is no way, it seems it is time to upgrade the hack program, so carefully read the next audio event.
The sequence of events that can be automatically played is as follows
Loadstart, Loadedmetadata, Loadeddata, Canplay, playing
Events that are triggered when AutoPlay is not available vary by system version
* IPhone5 IOS 7.0.6 Loadstart
* iphone6s, Loadeddata, Loadedmetadata, Loadstart, IOS 9.1
Finally found that compared to the original hack scheme, for IOS 9 also need additional load, otherwise direct play can not let audio start playing.
Audioel.load (); IOS 9
Audioel.play (); IOS 7/8 only needs play
<! DOCTYPE html>Solutions for HTML5 audio tags not playing properly on iOS systems