RussellP635
Posts: 4
Joined: Mon Aug 10, 2020 12:06 pm

camera.direction

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

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

Re: camera.direction

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.

RussellP635
Posts: 4
Joined: Mon Aug 10, 2020 12:06 pm

Re: camera.direction

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: camera.direction

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

Return to “Issues”