FlutterMidiCommand icon indicating copy to clipboard operation
FlutterMidiCommand copied to clipboard

Is there any way to get this working with Flutter Web?

Open agdsat134 opened this issue 5 years ago • 25 comments
trafficstars

If it isn't supported, are there plans to support it in the future?

agdsat134 avatar Jul 02 '20 00:07 agdsat134

I guess it could potentially be supported. At least on the browsers that supports the Web MIDI API. No plans at this point though, but happy to consider it if there is a need.

mortenboye avatar Jul 08 '20 19:07 mortenboye

I'm using FlutterMidiCommand for an iOS/Androd app I am working on. If you get this to work on Web that would be great for me too. (also MacOS and Win?) BTW - thanks for your work on this package.

systemcode avatar Jul 09 '20 14:07 systemcode

I would also be interested

narrsam avatar Aug 27 '20 06:08 narrsam

+1

davebound avatar Sep 03 '20 10:09 davebound

Currently blocked by https://github.com/dart-lang/sdk/issues/33248

the bridge to html does not initialise input and output maps correctly, but return empty maps.

mortenboye avatar Sep 10 '20 09:09 mortenboye

I'm using FlutterMidiCommand for an iOS/Androd app I am working on. If you get this to work on Web that would be great for me too. (also MacOS and Win?) BTW - thanks for your work on this package.

macOS support has just been released.

mortenboye avatar Sep 24 '20 17:09 mortenboye

I render with WebView, and flutter passes information to WebView

ifredom avatar Oct 12 '20 08:10 ifredom

macOS support has just been released.

Does not seem to work in 0.2.4

[!] CocoaPods could not find compatible versions for pod "flutter_midi_command": In Podfile: flutter_midi_command (from Flutter/ephemeral/.symlinks/plugins/flutter_midi_command/macos)

Specs satisfying the flutter_midi_command (from Flutter/ephemeral/.symlinks/plugins/flutter_midi_command/macos) dependency were found, but they required a higher minimum deployment target.

systemcode avatar Oct 28 '20 20:10 systemcode

@systemcode what is your deployment target?

mortenboye avatar Oct 28 '20 21:10 mortenboye

@systemcode what is your deployment target?

flutter run -d macos

Looks like everything is set up correctly to me.

systemcode avatar Oct 28 '20 21:10 systemcode

@systemcode The example project works for me on 10.15.7

Please file a separate issue regarding macos.

mortenboye avatar Oct 29 '20 09:10 mortenboye

Any update on this since the Flutter Web stable release?

stuartwk avatar Mar 12 '21 05:03 stuartwk

@stuartkuentzel No, it seems nothing relevant have changed in the html API. I think package:js/js.dart could be a way to work around this, but haven't had a chance to dive into it.

Contributions are welcome

mortenboye avatar Mar 12 '21 07:03 mortenboye

Just an update on this, I'm using a variation on the work around from this comment successfully with a flutter web app at the moment.

My "variation" is that I've got the "wrapper" code in a JS file versus doing it purely from Dart code using dart:js but that should be just an implementation detail.

My code is pretty rough at the moment (eg. only deals with 1 midi device) but I can try to clean it up and submit a PR if you would be interested in including it @mortenboye ?

As a side note, it also seems to work ok with the brand new support for WebMidi that Firefox has just added in v97 (currently in nightly builds only).

maks avatar Feb 01 '22 09:02 maks

Sorry forgot to include a link to my current workaround code in the Flutter app project I'm using it in at the moment.

maks avatar Feb 01 '22 09:02 maks

Thanks @maks, you are very welcome to submit a PR. Web support in this library would be great to have.

mortenboye avatar Feb 01 '22 12:02 mortenboye

@mortenboye actually it turns out I can just do all this in a separate repo since you've already created the structure for federated plugins when you did the Linux platform support. So its still a work-in-progress, but I now how initial midi message receiving from a single controller (Akai Fire) I have in this repo: https://github.com/maks/flutter_midi_command_web I'll publish on pub shortly and also add sending support soon too.

Once its ready, it would be great if you could add it as an "endorsed" platform plugin.

maks avatar Feb 09 '22 07:02 maks

@maks that is great progress! Actually there already is a repo for web support here https://github.com/InvisibleWrench/flutter_midi_command_web which you can make a PR to, but I'm happy to endorse yours as well.

mortenboye avatar Feb 09 '22 07:02 mortenboye

Oh sorry @mortenboye I completely missed that! Yes, I'll switch over and make a PR to your existing repo.

maks avatar Feb 09 '22 07:02 maks

One thing I should also add is I'm depending on the very new js_binding package, it then depends on the latest version of package:js which means this only works on Flutter master channel for the moment.

maks avatar Feb 09 '22 07:02 maks

I think if we keep the web support on the dev branch initially, that should not be a problem.

mortenboye avatar Feb 09 '22 08:02 mortenboye

I really hope this package will support web. That would be great! Thanks for this package!

joranmulderij avatar May 21 '22 05:05 joranmulderij