- From: Dominique Hazael-Massieux <dom@w3.org>
- Date: Fri, 09 May 2014 18:08:10 +0200
- To: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
- Cc: Sam Dutton <dutton@google.com>, "bugzilla@jessica.w3.org" <bugzilla@jessica.w3.org>, "public-media-capture@w3.org" <public-media-capture@w3.org>
Le mercredi 18 décembre 2013 à 10:59 +0000, Stefan Håkansson LK a écrit (about http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-MediaDeviceInfoCallback) > > > Agreed, but after actually working with the API I think that > > polling is clumsy; > > to get the behavior described below, you would have to poll the API > > about every > > second for the entire lifetime of the call. > > Agree: an event would be more efficient and cleaner to code than > > polling. > I agree, this would be much cleaner. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24015 has a proposal for an event on navigator to avoid polling; I don't think that navigator implements the event listener interface, so it probably doesn't make sense to add it just for this. This could be moved to be a global event (i.e. on the window object); but I wonder if instead we could say that the MediaDeviceInfoCallback should be automatically invoked each time the list of media input and output devices change (roughly the same way navigator.watchPosition invokes its callback when the user position changes). Thoughts? Dom
Received on Friday, 9 May 2014 16:08:31 UTC