This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20515 - is the MIDIAccess object a singleton?
Summary: is the MIDIAccess object a singleton?
Status: CLOSED FIXED
Alias: None
Product: AudioWG
Classification: Unclassified
Component: MIDI API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Wilson
QA Contact: public-audio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-25 21:25 UTC by Marcos Caceres
Modified: 2013-01-18 15:51 UTC (History)
1 user (show)

See Also:


Attachments

Description Marcos Caceres 2012-12-25 21:25:43 UTC
As in: 

a = navigator.requestMIDIAccess();
b = navigator.requestMIDIAccess();

a === b? 

In the spec, this is currently unclear in 5.1.1:
"success: Let access be the MIDIAccess object for which access has been granted."

Which kinda reads like the spec is assuming requestMIDIAccess() will not be called repeatedly.
Comment 1 Chris Wilson 2012-12-26 17:21:00 UTC
Happy to make this explicit.  I will likely make it say it is not required to be a singleton, unless anyone objects.

It's not that calling requestMIDIAccess() repeatedly is broken, it's that it might be a bad idea - as it may re-prompt the user for access, if the system is prompting.
Comment 3 Olivier Thereaux 2013-01-18 15:51:00 UTC
Batch-closing RESOLVED MIDI issues. Reminder: midi issues now tracked at https://github.com/WebAudio/web-midi-api/issues