I need to create an acoustic warning in a PHP backed page that plays when certain conditions in PHP are met.
The only way of how to do this I can think of is conditional embedding of a small flash file that would play the sound upon rendering in browser… However, this seems as a bit out of date practice to me… Something like the JS alert() sound would be sufficient (I have considered using the alert() way too). Or the Facebook chat message notification sound…
Any other ideas how this could be done? Preferably using jQuery / JS etc…
(not looking for any complete solution / code etc, just point me in the right direction… if there is any)
HTML5 audio element
Popular JS library is SoundManager2