If the audio object is initialized with a broken link then it won't play a sound.
var audio = new Audio(link); // link = "www.badlink.com/sound.mp3"
audio.play();
How do I fire an error message if the sound doesn't play?
I've tried:
- checking the link with xmlhttp request for 404, but that doesn't work because the link is on an external domain.
- firing an error on abort, error, suspend, and other events. They are never triggered.
Thanks in advance.