I am playing audio files just fine but I need to stop any other sounds once I click on any other file within #messageCenter area. There is no isPlaying parameter inside of is there an easy to do this? The only other reference to this in Stack was a gaming plugin.
$("#messageCenter area").on( "click", function() {
var source = "assets/audio/" + $(this).attr('id') + ".wav";
var audio = $('#audio');
var sound = new Audio(source);
sound.play();
});