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.
var audio = new Audio('audio_file.mp3');
audio.play();