good example for how to use portsChanged #215
Unanswered
cristianvogel
asked this question in
Q&A
Replies: 1 comment
-
Hello Christian, When listening to an event, you have to add the listener on the object that dispatches the event. In this case, the event is being dispatched by the WebMidi.addListener("portschanged", e => {
console.log(e)
}); Hope this helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Would it be too much to ask for a code example of how to listen to portsChanged?
https://webmidijs.org/api/classes/WebMidi#event-portschanged
I can't really figure out how to set up a listener for this event, because it is not coming from a midi port? I specifically want to know if the output ports have changed.
Beta Was this translation helpful? Give feedback.
All reactions