ionic-team / pwa-elements

Quality UI experiences for Web APIs that require custom UI (such as media/camera).
https://medium.com/@maxlynch/building-the-progressive-web-app-os-57daebcb69c1
MIT License
168 stars 50 forks source link

CameraSource.Prompt configuration is not working #39

Closed amohseng closed 3 years ago

amohseng commented 5 years ago

I'm submitting a ... (check one with "x") [x] bug report

Current behavior: The camera modal is opening without prompt in the web browser. however in android is working as expected

Expected behavior: when camera options configuration include "source: CameraSource.Prompt", a prompt shall appear asking whether to take picture or from photos

Steps to reproduce: I am using Ionic 4 + Angular + Capacitor + pwa-elements 1- configure Camera Options with source: CameraSource.Prompt 2- ionic serve 3- open the camera modal by executing Plugins.Camera.getPhoto 4- Camera Modal will open directly without prompt -->

Related code: const image = await Plugins.Camera.getPhoto({ quality: 50, source: CameraSource.Prompt, correctOrientation: true, width: 600, resultType: CameraResultType.DataUrl, });

RangerRick commented 4 years ago

It appears that setting source doesn't work at all. When I try to pass source: CameraSource.Photos it still pops up the "take a photo" UI.

BluebambooSRL commented 4 years ago

Same as RangerRick source: CameraSource.Photos not working

shadowboxingskills commented 4 years ago

+1

andrewrains commented 3 years ago

Unfortunately, can't take a photo directly in iOS Safari PWA (issue #64), and can't prompt for the alternatives.

jcesarmobile commented 3 years ago

it's being tracked here https://github.com/ionic-team/capacitor-plugins/issues/493 will be fixed on camera plugin once https://github.com/ionic-team/capacitor-plugins/pull/487 gets merged