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
We can just use Audio and an object together like:
var audio = {}; audio['ubuntu'] = new Audio(); audio['ubuntu'].src="start.ogg"; audio['ubuntu'].play();
and even adding addEventListener for play and ended
addEventListener
play
ended