Tips for Web Authors
Autoplaying sound files
If you have a soundfile to accompany whatever is on your page, the correct thing to do is to allow the visitor the choice of switching it on.
Setting a soundfile to autoplay on loading is an absolute "no-no".
Don't do it unless you really, really, really want to infuriate your visitors and make sure they never visit your site again.
Many people are already listening to something of their own choice while checking out websites. Maybe they are logged onto the BBC to listen to their favourite radio programme which they had to miss last night. Suddenly having something else blasting out on top of it without warning or permission is not exactly going to make them love you.
What do you honestly think the chances really are of any visitor thinking, "Oh, this website is trying to force me to listen to something, I'd better turn off what I'm already listening to in order to hear what it is"?
If someone is sitting in their own home quietly listening to music and you come stomping in and switch on the television at loud volume without first asking for their agreement, it's odds-on they'll probably deck you and chuck you out.
If someone happens to be listening to the 2nd movement of Beethoven's 5th when they hit your website and you have set an mp3 to run automatically on loading, your page is almost certainly going to be off their browser almost immediately, your site put on their blacklist of sites never to visit again and your ears will probably be burning with the foul names they call you.
Do not do on a website something which would be considered arrogant and antisocial if you did it offline.
Because what would be arrogant and antisocial behaviour offline is every bit as arrogant and antisocial online.