I would like to play midi files in Firefox.
For example, I'd like to click on the files on this Wikipedia page and have them play in the browser and not have to download them and use a separate player.
I did get a plugin for VLC to play them, but even when it is set to handle midi files in Firefox's preferences either Totem still opens (and does nothing) or VLC opens it in a separate window (depending on the setting).
Is there a cleaner way of playing them embedded in the browser?
I know this isn't the answer you want, but modern browsers don't play midi files. To the best of my knowledge Mozilla dropped support for NPAPI plugins around the first quarter of 2017. Wikipedia makes this clear.
One solution is to download and play them in totem (a.k.a Videos) Totem requires a plugin for this that it doesn't automatically find. The solution to THAT is to be found in the fluidsynth package.
Another option mentioned by doug in a comment above can be found here: Audacious: How to play midi files?
S number of popular MIDI files can be found here.
Sources:
https://support.mozilla.org/en-US/questions/1149132
https://en.wikipedia.org/wiki/Wikipedia:Media_help
If you have Rhythmbox music player choose it instead of VLC. Rhythmbox can play MIDI files if fluid-soundfont-gm is installed. fluid-soundfont-gm can be installed from the default Ubuntu repositories in all currently supported versions of Ubuntu with the following command.
This Firefox addon is fine answer to the problem in september 2019. after adding on and click midi link the midi player open right up.
https://addons.mozilla.org/en-US/firefox/addon/midi-player/