Open Pomax opened 2 years ago
jazz-midi requires JZZ.js https://github.com/jazz-soft/JZZ
Try to include JZZ.js on your page, then call if (!navigator.requestMIDIAccess) navigator.requestMIDIAccess = JZZ.requestMIDIAccess
Cheers. The new Firefox "you get midi but only after you submit yourself to our addon process so that we know which pages you've put on the web" is a super disappointing development, so I'd much rather just go "don't bother with FF itself, use Jazz" =P
Oh, is there an ES Module version of the library (with an export { JZZ }
in it) so it can be loaded with the async
attribute to not block the page, and imported the modern way without needing any old school "if not loaded setTimeout for 100ms and retry" shenanigans =)
I'm afraid you have to do it manually. A CDN link would not take much loading time anyway. Or, you are welcome to play around with the index.d.ts, however it would need some updates.
It does, but my entire codebase is ESM because IE11 is finally only a few weeks away from proper permanent death so ESM finally "just works(tm)" in everything (hurray!). Rather than playing around with index.d.ts, it might just be a matter of "use esbuild to build both versions".
If I use the following code to detect midi support on https://pomax.github.io/mini-daw/:
then the jazz midi plugin does not appear to kick in using current Firefox.