mediaDevices.enumerateDevices broken in iframe
NWJS Version : from 0.45.2 -> 0.48.1 Operating System : reproduced on Linux and Windows 10
Expected behavior
It should be possible to get a complete list of media devices by calling navigator.mediaDevices.enumerateDevices() after obtaining permission from navigator.mediaDevices.getUserMedia().
Actual behavior
In the iframe, the list of media devices returned is incomplete and contains no label and no deviceId, as if we didn't have the permission to list media devices.
How to reproduce
- Upgrade to nw.js >= 0.45.2 (worked fine before).
- Run the attached code mediadevices_test.zip
- Application will open showing a complete media device list in the main window and an incomplete one in the iframe.

Partial workaround: adding --use-fake-ui-for-media-stream in chromium_flags allows it to work again in iframe, but other things break like screen sharing. Just tested with --disable-features=nw2 which also seems to restore expected behavior in iframe.
Linking to #7230
In NW2 there is better control for device access. You are loading code from remote domain in iframe to access local devices, which is blocked by default. This can be allowed by using chrome.contentSettings api .
So close as a non-issue for now.
For the record, regardeless of the Chrome extenion contentSettings, you need to add --use-fake-ui-for-media-stream to chromium-args properly get the devices name in enumerateDevices()
I have the same problem. Same scenario but NWJS version 0.52.2
In order to get the devices name --use-fake-ui-for-media-stream is needed in chromium_flags but then screenSharing is not correctly working. getDisplayMedia is returning a DOMException: Could not start video source.
Am I missing something?