Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
675 views
in Technique[技术] by (71.8m points)

ios - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...