w3c / mediacapture-main

Media Capture and Streams specification (aka getUserMedia)
https://w3c.github.io/mediacapture-main/
Other
121 stars 60 forks source link

enumerateDevices should be getAll() to match other APIs #157

Closed esprehn closed 9 years ago

esprehn commented 9 years ago

mediaDevices.getAll() is pretty clear and matches other APIs like the Cache API in SW.

adam-be commented 9 years ago

I'm unsure of the word "get" here. We don't want to faulty hint that this method "gets" the devices and access to use them (like getUserMedia() does).

esprehn commented 9 years ago

Perhaps you want getDevices() or getAvailableDevices() ? Having consistency is important for developer ergonomics. :)

jan-ivar commented 9 years ago

@esprehn I think it's the "get" part that's at issue, not "All". Personally I voted for mediaDevices.enumerate().

esprehn commented 9 years ago

No other API uses the word enumerate like this. This is a getter, just like cache.getAll() or getPermission(), etc. You could perhaps also just call it list(), but enumerateDevices() is super weird in the platform.

alvestrand commented 9 years ago

It's not unheard of. http://www.w3.org/TR/ws-enumeration/#Enumerate was a first hit on googling under w3.org/TR.

alvestrand commented 9 years ago

And the corresponding WebMIDI operator is called "requestMIDIAccess"...

http://www.w3.org/TR/webmidi/#requestmidiaccess

alvestrand commented 9 years ago

The WG has decided to respond with a proposed resolution to the Last Call comment suggesting "no change". Closing this bug for now; it may be reopened if the LC resolution process warrants reopening.

annevk commented 9 years ago

@alvestrand FYI, WS-* is the anti-pattern of standards.