-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
callback after end of sound #66
Comments
Hey, actually there is currently an event launched when a sound is over, and it works exactly as you suggested it: sound.on('end', function() {
}); There are four events you can listen to: You can see an example in the Sound test file at I will maintain this issue open until these are documented in the |
As I have just discovered, such a callback is already implemented. But as it is not mentioned in the documentation, I thought it is not present. So, for all those ones searching in the future for a callback after the file has finished playing, the above mentioned listener will work: sound.on('end', function() {
// do some stuff after reaching the end of the file
}); @alemangui Hey, thanks for your response mate... it seems we have written at almost the same time. Good to know there are such event-listener as they have practical value... |
I will keep this open until documentation for all events is added. |
Documentation on events added. |
Hi, me again :)
I just thought it would be a good idea if there would be a listener for the end of a soundfile. I searched in the docu for such a callback but couldn't see anything. There are use-cases, where you want to take some actions after the end of the file has been reached. It would be great to have something like:
by the way, I've just found an issue right here about trigger-events at the end of a file. So is a trigger already implemented? I ask as I can't see anything in the official doc.
The text was updated successfully, but these errors were encountered: