简体   繁体   English

离子电容相机插件

[英]Ionic Capacitor camera plugin

i'm using Ionic with Capacitor and camera plugin, it's work fine on native mobile(Android), but i want to be able work with local(server on Chrome), but i'm getting the following error:我正在将 Ionic 与 Capacitor 和相机插件一起使用,它在本机移动设备(Android)上运行良好,但我希望能够与本地(Chrome 上的服务器)一起使用,但出现以下错误: 在此处输入图片说明

The following steps already done:以下步骤已经完成:

  • npm install @ionic/pwa-elements npm 安装 @ionic/pwa-elements
  • defineCustomElements(window);定义自定义元素(窗口); in Main.ts在 Main.ts
  • Plugins.Camera.requestPermissions(); Plugins.Camera.requestPermissions(); in my camera service.在我的相机服务中。

I wrote my code based on the Capacitor blog我根据Capacitor 博客编写了我的代码

The only thought that comes to mind is, it's appear because i'm using desktop computer and i don't have a camera, but if so how can i handle it?想到的唯一想法是,它出现是因为我使用的是台式电脑而我没有相机,但如果是这样,我该如何处理?

Any suggestion will blessed:) Thanks!任何建议都会祝福:) 谢谢!

You are getting an error because there is no Camera.您收到错误,因为没有相机。 "Requested device not found" means the Camera was not found. “未找到请求的设备”表示未找到相机。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Jasmine spy 无法在 Ionic App 中使用 Capacitor Plugin - Jasmine spy not working on Capacitor Plugin in Ionic App 离子电容器共享插件不与whatsapp共享图像 - ionic capacitor share plugin not sharing image with whatsapp Capacitor/Ionic4:未安装 plugin_not_installed 的 BarcodeScanner - Capacitor/Ionic4: BarcodeScanner with plugin_not_installed 相机插件未在 Ionic 4 中打开相机 - Camera Plugin not opening camera in Ionic 4 ionic 5 angular(电容相机)和nodejs multer中的多张图片上传 - Multiple image upload in ionic 5 angular (Capacitor Camera) and nodejs multer 离子电容器 CameraPreview - 相机始终位于顶部。 没有 HTML 覆盖可能 - Ionic Capacitor CameraPreview - Camera is always on top. No HTML overlay possible 使用电容器作为相机插件,但会收到有关Cordova的错误 - Use Capacitor for Camera Plugin but get error regarding Cordova Ionic App Availability 插件(电容器)在 android 上总是返回 false - Ionic App Availability plugin (capacitor) always returns false on android 使用@ionic/angular 和@capacitor/XXX 实现插件/Api 之间的区别 - Difference between Plugin/Api implementation with @ionic/angular and @capacitor/XXX 通过媒体捕捉插件录制视频,但通过文件插件上传时出现问题 - 离子电容器 - record video through mediacapture plugin but issue while uploading through file plugin - ionic capacitor
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM