Re: [mediacapture-main] Allow ondevicechange to be fired before permission is granted or any device is opened

@foolip Good point that devicechange events are easily polyfilled with
 enumerateDevices. We should normalize the two features so people 
won't ever need to do that.

Someone suggested that, as an API cleanliness point, 
enumerateDevices() should return the old sequence before the event is 
fired anyway, and only calls after the event has fired should get the 
new sequence.

To extrapolate from that, if pages without permission never get the 
event fired, perhaps enumerateDevices should always return the old 
sequence if called more than once per page?

As counter-intuitive as it sounds, this would at least put the two 
features in the same basket, without deciding on the question in this 
issue one way or the other. I'm trying to avoid the "prevention had a 
loophole, so we shouldn't try" argument. ;)

@ShijunS Is it the case where users have no device to grant that is 
the problem? Would it help to make an exception for the zero to one 
devices case?

Other ideas:
 - Always fire on the active tab even without permission.
 - Apply a timing fuzz of several seconds of the event (and refreshed 
enumerateDevices results) on pages without permission. A site with 
permission could perhaps get somewhat higher timing precision.


-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at 
https://github.com/w3c/mediacapture-main/issues/402#issuecomment-250286510
 using your GitHub account

Received on Wednesday, 28 September 2016 20:17:18 UTC