dx7-synth-js
dx7-synth-js copied to clipboard
Enable Web MIDI for Firefox 99+
FF 99 supports Web MIDI as per https://bugzilla.mozilla.org/show_bug.cgi?id=836897. However, there is a little song and dance needed to prompt the user for the Web MIDI permission, as per https://extensionworkshop.com/documentation/publish/site-permission-add-on/.
I've implemented this in my own app at https://github.com/infojunkie/ireal-musicxml/commit/961654554c460bb645cf7a105981f30563f7038e. In a nutshell, here are the steps:
- Obtain a FF add-on (xpi file) called "site permission generator" that you host on your site, and that each user will download.
- To show a message on your app that the user needs to download this add-on, you detect an error during
navigator.requestMIDIAccess()and you detect that FF is the user agent. - The user downloads and installs the add-on, which then shows a second prompt to enable Web MIDI.
- The user needs to refresh the page. This time, the call to
navigator.requestMIDIAccess()will succeed and Web MIDI will be enabled.
You can refer to my commit above for a template of this process. Hope this helps!
Hey, thanks for the heads up and sharing the detailed instructions. I'll take a look when I have a chance to work on dx7-synth-js again.
This is no longer needed - newer versions of FF show a regular permission prompt to access Web MIDI API.
Ok - thanks for closing!