Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
agdsat134 opened this issue Jul 2, 2020 · 22 comments
Open

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

agdsat134 opened this issue Jul 2, 2020 · 22 comments

Comments

@agdsat134
Copy link

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

@mortenboye
Copy link
Contributor

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.

@systemcode
Copy link

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.

@narrsam
Copy link

narrsam commented Aug 27, 2020

I would also be interested

@davebound
Copy link

+1

@mortenboye
Copy link
Contributor

Currently blocked by dart-lang/sdk#33248

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

@mortenboye
Copy link
Contributor

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.

@ifredom
Copy link

ifredom commented Oct 12, 2020

I render with WebView, and flutter passes information to WebView

@systemcode
Copy link

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.

@mortenboye
Copy link
Contributor

@systemcode what is your deployment target?

@systemcode
Copy link

@systemcode what is your deployment target?

flutter run -d macos

Looks like everything is set up correctly to me.

@mortenboye
Copy link
Contributor

@systemcode
The example project works for me on 10.15.7

Please file a separate issue regarding macos.

@stuartwk
Copy link

Any update on this since the Flutter Web stable release?

@mortenboye
Copy link
Contributor

@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

@maks
Copy link
Contributor

maks commented Feb 1, 2022

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
Copy link
Contributor

maks commented Feb 1, 2022

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

@mortenboye
Copy link
Contributor

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

@maks
Copy link
Contributor

maks commented Feb 9, 2022

@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.

@mortenboye
Copy link
Contributor

@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.

@maks
Copy link
Contributor

maks commented Feb 9, 2022

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

@maks
Copy link
Contributor

maks commented Feb 9, 2022

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.

@mortenboye
Copy link
Contributor

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

@joranmulderij
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants