When a certain event occurs, I want my website to play a short notification sound to the user.
The sound should not auto-start (instantly) when the website is opened. Instead, it should be played on demand via JavaScript (when that certain event occurs).
It is important that this also works on older browsers (IE6 and such).
So, basically there are two questions:
- What codec should I use?
- What's best practice to embed the audio file? (
<embed>
vs.<object>
vs. Flash vs.<audio>
)