-
Notifications
You must be signed in to change notification settings - Fork 49
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
Are MIDIInputPort
and MIDIOutputPort
populated during requestMIDIAccess
?
#231
Comments
I'm not sure which way is best but I agree that it should be clarified in the spec since developer expectations will most likely diverge on this topic. |
Generally-speaking, is there an advantage for Gecko to do it asynchronously? Does this advantage outweigh the fact that it introduces an incompatibility between implementations? |
I don't think there is, it waiting isn't in the spec, so we didn't implement it, the This part of the spec is a bit hand wavy, there's no explicit enumeration steps, and thus it's unclear when to resolve the promise. This can be changed, and we can fix our implementation to resolve slightly later. |
Per you last comment, it is now clear that the spec should be updated to clarify the sequence. I suggest we align the spec with Chromium's existing behaviour so we do not introduce an unnecessary incompatibility. |
That would seem best, yes. Of course, the MIDI ports may change asynchronously, but it's probably better to have the initial list when the MIDIAccess is populated. |
Teleconference 4/6: |
Audio Working Group 2023-10-05 meeting conclusions:
|
Gecko's implementation populates the
MIDIAccess
' ports asynchronously w.r.trequestMIDIAccess()
call. It can therefore be that the promise returned fromrequestMIDIAccess
is resolved, without ports being available. Later,onstatechanged
is fired correctly, then the ports are added.Reading the code, it seems like Chromium resolves the promise returned by
requestMIDIAccess()
after enumeration, is that right? It's probably something that we'd want clarified. It seems like a useful property.The text was updated successfully, but these errors were encountered: