electron: MediaDevices.getUserMedia() Promise never resolves
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version:
- 8.2.3
- 9.0.0-beta.13
- Operating System:
- Windows 10 (2004, OS Build 19041.208)
Expected Behavior
navigator.mediaDevices.getUserMedia() would return a Promise that resolves, rejects, or asks the user for permission.
Actual Behavior
navigator.mediaDevices.getUserMedia() returns a Promise that never resolves and doesn’t prompt the user for permission.
To Reproduce
https://gist.github.com/Preston159/6811c612a77aa9121521700ca27a6c78
Additional Information
The MDN page for getUserMedia() states that it is possible for the Promise to neither resolve nor reject if the user ignores the request, but no request is made. Although the promise never rejects and the video feed is never available, Windows (in Settings > Privacy > App permissions > Camera) says my camera is “Currently in use” by Electron. In addition, switching “Allow desktop apps to access your camera” to off while the application is running causes the Promise to reject with “DOMException: Could not start video source”.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 11
- Comments: 17 (8 by maintainers)
We have seen the same behavior (
getUserMedianot resolving) on certain set ups, after we code singed our app with a different EV certificate. We are on electron 7.1.x and we have only seen this on Windows 10 (different versions). We are going to try with 5.0.x to see if there is a difference and report back.