I might be misinterpreting how enumerateDevices is supposed to work, but in that case I don't know how to work around this.
I'm using `navigator.mediaDevices.enumerateDevices()` to detect the camera name. However, the first time the user opens the page, it asks him for permission to use the camera and enumerateDevices returns *before* he clicks "allow". The camera IDs are there, but the labels are empty.
Is there any event I could subscribe to that would run enumerateDevices once the permission has been granted and labels are available?
I think this function is fairly useless if it doesn't block until the permissions are granted. There could be at least some option for it.
I tried this on both Chromium 56.0.2924.76 and the latest build from git. I'm using Debian testing. A colleague said he's not having these issues on Windows, but I haven't verified it yet.
Comment 1 by guidou@chromium.org
, Mar 16 2017