Hacker News new | ask | show | jobs
by marcus 4960 days ago
iOS audio will only play in response to user generated event (click for example) never when the site loads.

And I am not saying it has to be a random noise or very loud the accelerometer on the iDevices since the iPhone 4 is superb a very low sound will probably be sufficient. The sound can be easily integrated into the natural flow of the site, as many sites already do small beeps or play music etc to provide feedback to the user.

2 comments

If you play the sound using the Web Audio API, you're not restricted by user interaction.
This specifically arrived for MobileSafari only in IOS6, right? Do you have an example of a page demonstrating a sound without interaction for testing?
If they are running a version of iOS older than 6.0, they are definitely not using an iPad Mini, so you have answered the question in that case.
My interest is in the digression -- playing sound without a user click to initiate -- rather than the Mini-detection. So still interested in a clarification/example of where this is possible.
Really? I swear there are video games that start playing music when launched, but maybe they are just clever about it.

Edit: Oops, this is a Safari question, not an iOS app question, so this doesn't apply.