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

Load another song without re-triggering onStop #12

Open
earboxer opened this issue Jun 7, 2019 · 2 comments
Open

Load another song without re-triggering onStop #12

earboxer opened this issue Jun 7, 2019 · 2 comments

Comments

@earboxer
Copy link
Contributor

earboxer commented Jun 7, 2019

Pause operates asynchronously, so if you call pause();$('#player').midiPlayer.play(song2data); It might pause at the beginning of song2 instead of during song1.

@earboxer
Copy link
Contributor Author

earboxer commented Jun 7, 2019

I might be wrong about this...

@earboxer earboxer changed the title Pause: Return a promise or accept a callback for when the pause has completed. Load another song without re-triggering onStop Jun 7, 2019
@earboxer
Copy link
Contributor Author

earboxer commented Jun 7, 2019

My problem is I want to load a second song as soon as the first song is over.

my onStop hook does

songNumber++;
jQuery('#player').midiPlayer.play(song[songNumber]);

But for some reason, it's always getting called twice (so I don't hear the odd numbered songs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant