Answered
How to detect end of audio and run a function after
Im trying to detect when the end of my audio happens so I can run a function.. something simple will do for now such as a console.log.
Im stuck please help!
Im trying to detect when the end of my audio happens so I can run a function.. something simple will do for now such as a console.log.
Im stuck please help!
Hi.
Assuming you have a sound in the Library with the linkage name Voice, then the code could be something like this:
var sound = createjs.Sound.play("Voice");
sound.on("complete", function()
{
console.log("sound finished");
});
I hope it helps.
Regards,
JC
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.