CameraSource.Photos launches camera on PWA rather than image picker
See original GitHub issueDescription of the problem:
When launching Camera.getPhto with parameter, source: CameraSource.Photos, the camera modal pops up rather than an image picker. Possibly related to #490 ?
Affected platform
- Android
- iOS
- electron
- web
OS of the development machine
- Windows
- macOS
- linux
Other information:
Capacitor version: 1.0.0-beta.25
node version: v11.6.0
npm version: 6.5.0-next.0
CocoaPods version:
Steps to reproduce:
const image = await Plugins.Camera.getPhoto({ quality: 100, allowEditing: false, resultType: CameraResultType.Base64, width: this.maxWidth, correctOrientation: true, source: CameraSource.Photos, saveToGallery: false });
Link to sample project:
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
CameraSource.Photos is opening pwa camera instead of gallery
Camera.getPhoto() with source Photos is opening pwa camera instead of showing gallery in my android phone. I also tried using Prompt as a...
Read more >Camera Capacitor Plugin API
The Camera API provides the ability to take a photo with the camera or choose an existing one from the photo album.
Read more >CameraPlugin pickImages() does not open the gallery on ...
pickImages() in my PWA on any device, the phone won't open the gallery, but instead opens the main camera of the phone.
Read more >Take a picture using the camera - Flutter documentation
Warning: If you do not initialize the CameraController , you cannot use the camera to display a preview and take pictures. 4. Use...
Read more >Take photo and access the picture library in your PWA ...
On desktop, same element will give access to a file(s) picker instead. ... No matter if camera, photo library or file picker, once...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bkarv I’ve had to code in an alternative for PWA’s using input type=“file” for the time being.
I based my solution on @judgewest2000’s example… Refer https://forum.ionicframework.com/t/ionic-4-pwa-camera/151148/3 and https://github.com/judgewest2000/IonicPwa (I removed the capture attribute to trigger an action sheet prompt for image source).
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.