Page 1 of 1

camera.direction

Posted: Wed Aug 19, 2020 3:14 pm
by RussellP635

Hi
I've built a basic app using the cordova camera plugin, and now I want to use the front camera (selfie) rather than the back camera, which is the default.

When I go to app settings> cordova plugins > options I can add an option for direction (either front camera or back camera, as described at (
https://cordova.apache.org/docs/en/late ... .Direction ) .

I have tried many variations, e.g. camera.Direction, Direction and many values FRONT, BACK, 0, 1. But I cannot get it to work.

When I go to the request settings for the page I am using the camera on, I cannot edit the values. So I cannot add an extra value to map on to.

Any advice would be appreciated.

thanks

Russell


Re: camera.direction

Posted: Wed Aug 19, 2020 7:53 pm
by Galyna Abramovych

Russel,

Appery.io has predefined Camera support for that, it is not a problem to integrate it into your app, you will need only a few clicks on the app UI: https://docs.appery.io/docs/cordova-jquerymobile-camera.


Re: camera.direction

Posted: Thu Aug 20, 2020 4:14 am
by RussellP635

Hello Galyna

Thank you for your reply,

However, I have used the pre-defined plugin camera support, but find that I cannot add a new setting, I can only set the attributes of the existing settings.n not


Re: camera.direction

Posted: Thu Aug 20, 2020 9:05 am
by Serhii Kulibaba

Hello,

I afraid it is not possible to enable a front camera by default (seems like a security purpose)
See the Cordova documentation:

Any cameraDirection value results in a back-facing photo. (= You can only use the back camera)

https://cordova.apache.org/docs/en/late ... ons-errata