I've created a little PHP/Ajax WebChat for our company. Whenever a new message is received, it should play a notification sound by using the method in this ones first answer.
How to play a notification sound on websites?
The problem now is that when accessing it from any normal computer it works fine, but from the (quite restricted) company network it give me a "HTTP Status 503 Service Unavailable" in Console. Since it is working on any other Internet Access, this is quite odd. One additional point, I got the notification sound from: https://notificationsounds.com/
If entered from company network, some sounds are played and some are not. After a refresh, the sounds that work are different than before the refresh. It's like it randomly plays the sound. NOTE: The Chatserver is located at my home.
What could be the problem, and is there any kind of work around that doesn't have to use the method from the other post?
This is the code that I use to load and play the notification sound:
chat.playSound("the-calling");
playSound : function (filename) {
document.getElementById("sound").innerHTML=
'<audio autoplay="autoplay">
<source src="https://notificationsounds.com/soundfiles/a516a87cfcaef229b342c437fe2b95f7/file-sounds-1068-the-calling.wav" />
<source src="https://notificationsounds.com/soundfiles/a516a87cfcaef229b342c437fe2b95f7/file-sounds-1068-the-calling.ogg" type="audio/ogg" />
<embed hidden="true" autostart="true" loop="false" src="/sounds/' + filename +'.mp3" />
</audio>';
}