grimmdude / MidiPlayerJS

♬ MIDI parser & player engine for browser or Node. As a parser converts MIDI events into JSON. Works well with single or multitrack MIDI files.
https://grimmdude.com/MidiPlayerJS/
MIT License
357 stars 52 forks source link

"MidiPlayer.Player is not a constructor" error is back since version 2.0.14 #90

Closed leocaseiro closed 1 year ago

leocaseiro commented 1 year ago

Hi there,

I found out that this issue used to happen in version 2.0.5 (#63), and it's happening also for versions 2.0.14 - 2.0.16

You can see an example here: https://codesandbox.io/s/vexflow-midiwriterjs-midiplayerjs-r3g4kw

Note that I'm using version 2.0.13, but upgrading to 2.0.14, it gives me the error.

grimmdude commented 1 year ago

Hi @leocaseiro, thanks for letting me know. It looks like in your codesandbox.io example, require('midi-player-js') is returning an object with everything under the default property.

Not totally sure why that is, and I can't replicate it by installing and requiring the module in the same way locally 🤔

grimmdude commented 1 year ago

Actually, looks like we already have a conversation going on this issue in #63 so gonna close this one out.