Closed flxwu closed 6 years ago
Done @feross 👍
Hmm, I see that you took my review literally haha. It turns out that dispatch
is not actually defined in that browser/player.mjs so this doesn't work.
I'll fix it in a followup commit.
Actually it does work, although I was wondering how it could work despite dispatch being undefined.
So I added a console output in the event case and it got called everytime dispatch got called by the player.on('end) event. IDK why, but it did the proper event dispatch call :)
Oh, that's because I attached dispatch
to the window for debugging purposes haha. https://github.com/feross/bitmidi.com/blob/master/src/browser/index.mjs#L13
now returns back to:
when track has played to its end.