I am trying to bind an event where when the audio finished playing, it would fire a certain function, but however, when I bind the event it says aux.bind is not a function.
var aux = new Audio("file.mp3");
aux.bind("ended", function(e){
aux.volume = 1.0;
});
I have even tried aux.on(...)
and it does not work either.
UPDATE: I will require to unbind the event later after the "ended" has fired