midi-player icon indicating copy to clipboard operation
midi-player copied to clipboard

Load another song without re-triggering onStop

Open earboxer opened this issue 6 years ago • 2 comments

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 avatar Jun 07 '19 19:06 earboxer

I might be wrong about this...

earboxer avatar Jun 07 '19 19:06 earboxer

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).

earboxer avatar Jun 07 '19 20:06 earboxer