var audio = new Audio('audio_file.mp3');
audio.play();Took me 30 seconds and a Google search. On Wednesday, 23 April 2014 10:28:07 UTC+1, Sam wrote: > > I would like play a customized alert sound on the browser. It will play > from a alert.wav file I created. > > Currently, I am using AngularJS to create an alert by using > $window.alert(alert_msg). However, there is no sound with this function. > How can I play a customized alert sound on browser when the alert box pops > out? Can this be done in the AngularJS way > > Thank you for your help. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
