4

I am using

<input type="file" accept="image/*;capture=camera">

to get image input from the users camera. This is apparently the old way of doing it but that is what they want.

Is there any way to specify that the front (or back) camera should be used? The user would still be able to switch cameras if desired but the default camera would be set in html (maybe as an attribute?).

I only need this for Chrome on Android so cross-browser is not an issue.

The Media Capture docs say the user should be able to choose which camera but it says nothing about the developer:

Similarly, the user agent should allow the user:
     -to select the exact media capture device to be used if there exists multiple devices of the same type (e.g. a front-facing camera in addition to a primary camera).
user1873073
  • 3,580
  • 5
  • 46
  • 81

1 Answers1

3

An official response from a Google developer on July 7 says that this is not yet possible: https://groups.google.com/d/msg/discuss-webrtc/i07T1X_DY94/fVE5_vYK6sAJ

tomtheengineer
  • 4,127
  • 1
  • 17
  • 15