Skip to content
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

Why callback not be cleared automaticlly after sound stopped #1695

Open
AG2023 opened this issue Nov 14, 2023 · 0 comments
Open

Why callback not be cleared automaticlly after sound stopped #1695

AG2023 opened this issue Nov 14, 2023 · 0 comments
Labels

Comments

@AG2023
Copy link

AG2023 commented Nov 14, 2023

The Problem

I find that when user add an 'end' event and callback to a sound (with "once" method) and play it, if user stop the sound before it play to complete, the callback will not be cleared automatically. you can repeat the operation several time, once the sound play to complete, the callback will fired many times.

Reproducible Example

howl.once('end', callback);

Reproduction Steps

I add an 'end' event and callback to a sound (with 'once' method as: howl.once('end', callback)) and play it, then stop it before it complete.
Repeat the above operation 5 times. but in the last time, do not stop the sound, let it play to complete.
Issue: when the sound (the last play) play to complete, the callback are fired 5 time in same time.
In my mind, when use stop a sound, the callback should be cleared automatically, because the callback is no longer useful。

Possible Solution

No response

Context

No response

Howler.js Version

v2.1.3

Affected Browser(s)/Versiuon(s)

Chrome 119.0.6045.124

@AG2023 AG2023 added the bug label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant