I cannot seem to get audio media to play in Mobile Safari on iOS 4.2.1 in any situation other than the handler of a click event performed by the user. Even then, if p
As a workaround, I tried tying the load()/play() code to a click event, and then triggering the click event programmatically. This approach worked in Desktop Safari, but not Mobile Safari.
On my 3rd-gen iPad running IOS 6, autoplay of HTML5 tags has suddenly begun working! (I've had IOS 6 installed for a couple of weeks, and am pretty sure I tested this feature right away, but only noticed it working tonight.) I don't recall seeing any notice of this from Apple, although I did see that mobile Safari had been granted the ability to support file uploads via
<form><input type="file" .../></form>
-- another feature I needed but which Apple had withheld.
Starting from iOS 4.2.x, the download of media will not be started if there isn’t a user-input event, like touchstart.
So the answer is no, there is no method to autoplay media by JavaScript or something else.