Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
151
rated 0 times [  158] [ 7]  / answers: 1 / hits: 15622  / 8 Years ago, fri, june 3, 2016, 12:00:00

How to access user's camera from the main process (i.e. main.js) in Electron, without opening a window?


More From » electron

 Answers
8

No. There are a number of APIs that have to be run in the renderer process, such as Notifications, and it looks like accessing a camera is one of those. If you don't want to actually show a BrowserWindow, pass the show:false option (documented here)



Here's a sample app using the camera: https://github.com/hokein/electron-sample-apps/tree/master/camera.


[#61913] Wednesday, June 1, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mariamiyanab

Total Points: 75
Total Questions: 102
Total Answers: 92

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
;