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
[next] (web midi) window.navigator.requestMidiAccess() returns null #20082
Comments
Removed Priority-Unassigned label. |
Issue #21805 has been merged into this issue. |
This issue came up again on misc (https://groups.google.com/a/dartlang.org/forum/#!topic/misc/FuLyWDlPoYc) and as a duplicate in issue #21805. As rms notes a workaround exists: But this seems like a giant hack. Let's see if we can fix this? |
Hoping this will get fixed with Terry's work on the next rev of html. Changed the title to: "[next](web midi) window.navigator.requestMidiAccess() returns null". |
It's been three years since the comment above - my guess is that this didn't get fixed? (Still seems broken in current DartPad). I might be interested in using this soon, is it something an outsider might be able to fix? Could anyone point me in the right direction to look? |
I know this is the older issue, but should it be closed in favour of #33248 which seems to be more active and has more up to date? |
@DanTup not sure if you are still interested in this topic, but I think I've finally tracked down what it takes to get Webmidi working with Dart (guess after almost 8 years, better late than never? 🙂 ) in my latest comment over on #33248 #33248 (comment) But in debugging this I also found that DartPad seems to set a http policy header that also prevents use of Webmidi with Dartpad as I note your comment mentioned that you saw it not working there. |
@maks ah, interesting! I might be interested in this again in the future, but right now my drum kit (which this was a project for) is boxed up in the garage due to lack of space, so not likely something I'll look at in the near-term. I think you're right that this is a dupe of #33248 though, so I'll subscribe there and close this one. Thanks! |
This issue was originally filed by dorbo...@gmail.com
What steps will reproduce the problem?
Use Dartium Version 36.0.1985.97 (282401), Dart SDK version 1.6.0-dev.3.0
Enable browser switch --enable-web-midi
Try and run the following code in dartium
import 'dart:html';
void main() {
window.navigator.requestMidiAccess().then( (a,b) => print("access"), (c) => print("error"));
}
What is the expected output?
The console should display either "access" or "error" text messages
What do you see instead?
Exception: The null object does not have a method 'then'.
NoSuchMethodError: method not found: 'then'
Receiver: null
Arguments: [Closure: (dynamic, dynamic) => dynamic, Closure: (dynamic) => dynamic]
What version of the product are you using?
1.6.0-dev.3.0
On what operating system?
Win7
What browser (if applicable)?
NA
Please provide any additional information below.
I'm able to use navigator.requestMidiAccess() successfully in javascript on the same dartium browser... so I know Midi works with this dartium browser.
I'm was tring to port http://webaudiodemos.appspot.com/monosynth/index.html
from javascript to dart. A similar example from the Dart Team would be really helpful.
The text was updated successfully, but these errors were encountered: