[英]How to access camera from Electron's main process
如何在不打开窗口的情况下从Electron的主进程(即main.js
)访问用户的相机?
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. 否。在渲染器进程中必须运行许多API,例如“通知”,并且似乎访问摄像头就是其中之一。 If you don't want to actually show a BrowserWindow, pass the
show:false
option ( documented here ) 如果您不想实际显示BrowserWindow,请传递
show:false
选项( 在此处记录 )
Here's a sample app using the camera: https://github.com/hokein/electron-sample-apps/tree/master/camera . 这是使用相机的示例应用程序: https : //github.com/hokein/electron-sample-apps/tree/master/camera 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.