These updates have now been pushed to the PR. Den 27. jan. 2016 12:11, skrev Harald Alvestrand: > Hi, > > some time ago I made my proposal for MediaCapture permissions into a > pull request here: > > https://github.com/w3c/permissions/pull/57 > > I've had some dialogue with Mounir about it afterwards (partly in the > PR), and I intend to make the following updates: > > - Delete the "all-*" variants of permissions > - Add a new meaning to the descriptor: If there's no device in it, it > means "any" > - Add a new value for the descriptor: If the device is "*", it means "all". > > Thus, you could say > > navigator.permissions.query({name:'camera'}).then(function(result)) { > if (result.state == 'granted') { > // I know I can request "any camera" and get something, if any > cameras exist > > navigator.permissions.query({name:'camera', deviceId='*'}).then( > if (result.state == 'granted') { > // I know I have access to all cameras that exist > > navigator.permissions.query({name:'camera', deviceId='abcdef'}).then( > if (result.state == 'granted') { > // I know I have access to the specific camera with id 'abcdef' > > Does this make sense to people? > (I'm not 100% sold on the usefulness of the '*' device ID myself...) > > Since this crosses two WGs, perhaps comments on the PR itself is easiest. > > Harald >Received on Wednesday, 27 January 2016 12:42:15 UTC
This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:17 UTC