Playing customized alert sound using AngularJS

6,136 views
Skip to first unread message

Sam

unread,
Apr 23, 2014, 5:28:07 AM4/23/14
to ang...@googlegroups.com

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.

Gabriel Aszalos

unread,
Apr 23, 2014, 9:20:35 AM4/23/14
to ang...@googlegroups.com
var audio = new Audio('audio_file.mp3');
audio.play();
Took me 30 seconds and a Google search.

Eric Ratshili

unread,
Aug 5, 2014, 8:19:10 AM8/5/14
to ang...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages