The ability to play a MIDI File in a browser depends on the browser and the OS.
The HTML5 <audio> element depends on the local MIDI file player (Windows Media Player or Quicktime, for example) to play the file. The QuickTime MIDI file player that was formerly part of the Mac OS no longer exists, so anyone using a Mac running 10.4 or later (I think) can't use the <audio> element to play MIDI files in a browser.
According to the midi.js website, their solution uses the Web Audio API to play the MIDI file, which requires a browser that supports the Web Audio API (Safari does not, and Chrome on iOS does not). The website says it will fallback to "conventional plug-in methods", but that won't help someone whose browser and/or OS doesn't provide any method for playing a MIDI file.
Since you say your problem is you can only play some files and not others, it doesn't seem like your particular configuration (browser and OS) is likely to be the problem, but if you let us know your configuration, maybe someone here with a similar configuration can provide some assistance.