Replies: 6 comments 8 replies
-
To do that, you can listen for the WebMidi.addListener("connected", e => {
console.log(e.port.name);
}); There are other such events that might be of interest to you such as P.S. I moved the issue to a conversation since it isn't a problem with the library. |
Beta Was this translation helpful? Give feedback.
-
This should work. I know it works for me in the browser. What environment are you in? |
Beta Was this translation helpful? Give feedback.
-
I'm also having trouble getting this event to fire using the below code: I was assuming that simply plugging in my midi controller and turning it on would get it to trigger, but maybe i misunderstand? |
Beta Was this translation helpful? Give feedback.
-
@jdlee022 I can replicate this problem in Node. It looks like the |
Beta Was this translation helpful? Give feedback.
-
I have created issue #271 to follow-up on this problem. The author of the Thanks for @jdlee022 and @elmcapp for bringing this issue to light. |
Beta Was this translation helpful? Give feedback.
-
Just want to report that listening for 'connected', 'disconnected', and 'portschanged' seems to be working fine now in Node / Electron with webmidi v3.0.21. Plugging in / unplugging a USB MIDI device emits the event as expected for me. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to get a list of new midi devices when a new device is plugin. Currently I can only get a list of new midi devices when I run the following function. However I like to know if there is a listener or a way allow new midi device to show without running the function every time a new device is connect. something like a hot load
Beta Was this translation helpful? Give feedback.
All reactions