Giter Site home page Giter Site logo

Comments (16)

leocharrua avatar leocharrua commented on April 29, 2024 5

Hello. In my case, always opens the front camera by default. Any workaround to open the rear camera by default? Thanks

from capacitor-plugins.

jcesarmobile avatar jcesarmobile commented on April 29, 2024 1

yeah, web camera doesn't support all the native features

from capacitor-plugins.

jcesarmobile avatar jcesarmobile commented on April 29, 2024

Is it when you run as web or as android? In the title you said pwa, but you checked android as platform and not web

from capacitor-plugins.

LuisPerez94 avatar LuisPerez94 commented on April 29, 2024

Is it when you run as web or as android? In the title you said pwa, but you checked android as platform and not web

Sorry, is in the mobile browser. I'm using Chrome and my phone is Huawei mate 10. I supose it happens me now because my phone camera is powerful than my laptop camera.

from capacitor-plugins.

LuisPerez94 avatar LuisPerez94 commented on April 29, 2024

Can you tell me what file it needs to be updated?. maybe I can help with a PR.

from capacitor-plugins.

jcesarmobile avatar jcesarmobile commented on April 29, 2024

could be https://github.com/ionic-team/capacitor/blob/master/core/src/web/camera.ts or could be this package the plugin uses for taking the pictures https://github.com/ionic-team/pwa-elements

from capacitor-plugins.

vosecek avatar vosecek commented on April 29, 2024

Any chance to improve Camera capabilities to resolve this issue?

Thanks

from capacitor-plugins.

Duy-Nguyen-Globals avatar Duy-Nguyen-Globals commented on April 29, 2024

I am having the same issue with PWA Camera on web app, but in mobile app, the same code took the options works very well.

from capacitor-plugins.

leocharrua avatar leocharrua commented on April 29, 2024

Sorry @Duy-Nguyen-Globals, with "mobile app", are you meaning generating APK for Android, for example, aren't you? Because, If I run the PWA in Windows, Android or iOS like PWA or Web App, I allways get the front camera for default and the settings didn't work.

from capacitor-plugins.

Duy-Nguyen-Globals avatar Duy-Nguyen-Globals commented on April 29, 2024

Yes, I deployed to Android, iOS by capacitor, and on mobile OS, Camera Plugin worked as expect. In case open using application on mobile Chrome or Safari, the Camera Plugin simply ignores all the options and turn on the Front facing Camera as default, even if I switch to Rear Camera, the plugin always picked the tele Camera or the super wide camera other than the main best quality Camera when using multi-cam Smartphone.
Capacitor version:
"@capacitor/android": "^2.4.6",
"@capacitor/core": "^2.4.6",
"@capacitor/ios": "^2.4.6",

from capacitor-plugins.

leocharrua avatar leocharrua commented on April 29, 2024

My PWA is for a small bussiness and there is not chance (nor sense), to publish in app markets. I think this must be resolved (I don't know by who) ... but in PWAs the camera must work ok.

from capacitor-plugins.

teggno avatar teggno commented on April 29, 2024

Would a PR be appreciated to enable setting width and height? As far as I can tell it's the file https://github.com/ionic-team/capacitor-plugins/blob/main/camera/src/web.ts. I would provide an implementation for the web using canvas.
Also, in case I create a PR, which version should it be based on?

from capacitor-plugins.

arcadeJHS avatar arcadeJHS commented on April 29, 2024

My PWA is for a small bussiness and there is not chance (nor sense), to publish in app markets. I think this must be resolved (I don't know by who) ... but in PWAs the camera must work ok.

Yes, same problem and requirement. How to enable, by default, the rear camera on web/pwa application?

from capacitor-plugins.

Dr141 avatar Dr141 commented on April 29, 2024

Hello. In my case, always opens the front camera by default. Any workaround to open the rear camera by default? Thanks

I was facing the same problem, and as a solution I changed the value of the facingMode variable in the constructor in the CameraPWA class.
Module path: \node_modules@ionic\pwa-elements\dist\esm\pwa-camera.entry.js

With the file open, we should search for the CameraPWA class and let the variable initialize with the following value (facingMode = 'environment'). With that the smartphone camera started on the main.

from capacitor-plugins.

KasTasElis avatar KasTasElis commented on April 29, 2024

The problem for options not being respected still exists. Web browsers seem to ignore the option of camera direction. This issue still needs attention.

from capacitor-plugins.

leocharrua avatar leocharrua commented on April 29, 2024

Hello. Any advance or workarround? Thanks

from capacitor-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.