简体   繁体   English

如何从Electron的主要过程访问相机

[英]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.

相关问题 如何从电子的主进程中获得 root 访问权限并使用磁盘使用率 (du)? - How can I gain root access and use disk usage (du) from electron's main process? 如何从渲染过程的主过程访问对象[Electron] - How do I access an object from the main process from a render process [Electron] Electron:如何从主流程(toPrint等)访问在渲染过程中渲染的网页内的Webview? - Electron : How to access webview inside a webpage which is rendered in the render process from the main process (toPrint , etc)? 电子:渲染器访问主进程? - Electron: renderer access to main process? 如何从 Electron 中的主进程访问 BrowserWindow JavaScript 全局? - How can I access the BrowserWindow JavaScript global from the main process in Electron? Electron:如何捕获来自主进程的所有请求响应? - Electron: How to catch all the requests response from the main process? 如何将参数从主进程传递到 Electron 中的渲染进程 - How to pass parameters from main process to render processes in Electron 电子如何在主过程中创建菜单? - Electron How to create menus in the main process? 如何从Electron上的预加载脚本中的渲染过程访问jquery - How to access jquery from the render process inside the preload script on Electron 如何在 Angular-Electron 中监听从主进程到渲染器进程的事件 - How to listen for an event from the main process to the renderer process in Angular-Electron
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM