question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CameraSource.Photos launches camera on PWA rather than image picker

See original GitHub issue

Description 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:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andrew-motorcentralcommented, May 27, 2019

@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).

0reactions
ionitron-bot[bot]commented, Nov 11, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found