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
Stop playback #2
Comments
Hi, the design of ion.sound was to avoid situation, there you will need stop method. But, i think it will be good to have one for some rare reasons. So, in future release i will add it. |
Yes I saw in the code that you don't require a stop when another instance of your sound starts, which is nice! Do you want me to make a branch with the adjustments? |
That is the plugin design. It is designed to only trigger sound playback. Not playing sounds with controls (you should agree that small sounds like "beep" are so short, that there is no need to stop them). So the stop method will be the last contol method for this plugin 😄 Or some time later people will ask for rewind methods 😩 |
Yes I agree! |
Added in 1.3.0 |
Great thank you! :D |
Hi,
It would be nice if you can stop the playback.
I added:
var stopSound = function (name) {
var $sound = sounds[name];
$sound.pause();
$sound.currentTime = 0;
};
and
$.ionSound.stop = function (name) {
stopSound(name);
};
This seems to work however I don't know if it stays in memory of the browser like this and takes unnecessary memory, you probably know better... :)
It would also be nice to add the stop fade-out-over-time (linear, ease, etc...)
The text was updated successfully, but these errors were encountered: