Comments (16)
Hello. In my case, always opens the front camera by default. Any workaround to open the rear camera by default? Thanks
from capacitor-plugins.
yeah, web camera doesn't support all the native features
from capacitor-plugins.
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.
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.
Can you tell me what file it needs to be updated?. maybe I can help with a PR.
from capacitor-plugins.
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.
Any chance to improve Camera capabilities to resolve this issue?
Thanks
from capacitor-plugins.
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.
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.
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.
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.
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.
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.
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.
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.
Hello. Any advance or workarround? Thanks
from capacitor-plugins.
Related Issues (20)
- Please provide marker rotation in google maps plugin HOT 2
- [splash-screen] Make docs usable for iOS app HOT 2
- Cannot select a printer from the Share dialogue box HOT 1
- bug(@capacitor/share): FATAL EXCEPTION java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tvoydnevnik/com.tvoydnevnik.MainActivity}: java.lang.SecurityException: com.tvoydnevnik: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts HOT 2
- Add Capacitor Webview HOT 2
- Add map events to be handled at client side HOT 2
- Complience with Apples Required Reason API HOT 18
- google.maps.Marker is deprecated HOT 1
- [Geolocation / Android] The GPS position is only updated every 5 seconds when using "watchPosition" function on Android HOT 1
- [Bug]: @capacitor/camera - Console (F12) error (undefined) clicking on the camera icon when still loading the camera or not alowing the permission yet. HOT 3
- [Feature] Deep linking for Chromebook Android (App appUrlOpen)
- @capacitor/share not work in android 14, capacitor 6 HOT 4
- [Bug]: @capacitor/camera - After taking a photo (web), a certain border around the photo is cut away. HOT 4
- [Bug]: @capacitor/camera - After turning the device from landscape to portrait, the wrong modes are used when taking a photo. HOT 3
- feat(@capacitor/device) Request to update device plugin to remove privacy-impacting APIs HOT 1
- @capacitor/browser add a new BROWSER_CLOSED event HOT 1
- [@capacitor/filesystem] Successful Filesystem.requestPermissions prompt never resolves due to missing case in callback HOT 5
- [Feature]: native camera max weight settings
- @capacitor/share not working with capacitor v6 HOT 2
- Filesystem.copy not working con content:/ android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capacitor-plugins.