简体   繁体   中英

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: 在此处输入图片说明

The following steps already done:

  • npm install @ionic/pwa-elements
  • defineCustomElements(window); in Main.ts
  • Plugins.Camera.requestPermissions(); in my camera service.

I wrote my code based on the Capacitor blog

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM