Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow only access to camera device in HTML5

I'm currently developing application using the camera for iphone in HTML5 with

<input type="file" accept="capture=camera">

The problem is that I have a little list that give me the choose between my library and my camera.

enter image description here

My idea is to have two buttons, one for the library and an other for the camera.

I know the way to only give the library but not for the camera.

Question: Is there a way to separate the two types?

like image 826
Simon Avatar asked Dec 19 '12 10:12

Simon


1 Answers

Unfortunaly not possible :/

Extract from HTML Media Capture - Security and privacy considerations :

In addition, the User Agent implementation is advised to provide an indication to the user when an input device is enabled and make it possible for the user to terminate such capture. Similarly, the User Agent is advised to offer user control, such as to allow the user to:

  • select the exact media capture device to be used if there exist
    multiple devices of the same type (e.g. a front-facing camera in
    addition to a primary camera).

  • disable sound capture when in the
    video capture mode.

like image 79
Kamasoutra Avatar answered Oct 12 '22 06:10

Kamasoutra