We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, Is there any supported method that can notify me as soon as the list of input/output devices has changed?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
The WebMidi object dispatches connected and disconnected events when devices are connected or disconnected. There is a little more info in the docs.
WebMidi
connected
disconnected
P.S. When you have a question regarding usage, I invite you to submit it to the brand new WebMidi.js forum. Cheers!
Sorry, something went wrong.
@djipco Thank you for your answer. But I don't understand how to use it. I tried the following but doesn't work.
WebMidi.connected().then(function(e) { console.log("CONEECTED!!!"); });
This is not how events work. To add a listener function to an event dispatched by the WebMidi object, you would use something like this:
WebMidi.addListener("connected", function(e) { console.log(e); });
I added this example to the More Code Examples section of the GitHub README page.
@djipco Thank you so much! I just asked another question in the forum so please check.
djipco
No branches or pull requests
Hi, Is there any supported method that can notify me as soon as the list of input/output devices has changed?
Thanks in advance!
The text was updated successfully, but these errors were encountered: