只允许在HTML5中访问相机设备 [英] Allow only access to camera device in HTML5
问题描述
我目前正在使用HTML5中的iphone使用相机开发应用程序。
< input type =fileaccept =capture = camera>
问题是,我有一个小列表,让我选择我的图书馆和我的相机。
我的想法是有两个按钮,一个用于图书馆,另一个用于相机。
我知道只有
有两种类型可以区分开来:不可能:/
从 HTML Media Capture - 安全和隐私权注意事项:
此外,建议用户代理实现在启用输入设备时向用户提供
指示,并使用户可以终止此类捕获
。类似地,建议用户
代理提供用户控制,例如允许用户:
select如果存在多个相同类型的设备(例如,除主要摄像机之外的前置摄像机在
中),则使用准确的媒体捕获设备。
在
视频捕获模式下禁用声音捕获。 >
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.
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?
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.
这篇关于只允许在HTML5中访问相机设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!