ios - 仅允许访问 HTML5 中的相机设备

标签 ios html input camera

我目前正在使用 HTML5 中的 iphone 相机开发应用程序

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

问题是我有一个小列表,可以让我在我的图书馆和我的相机之间做出选择。

enter image description here

我的想法是有两个按钮,一个用于图书馆,另一个用于相机。

我知道只给图书馆不给相机的方法。

问题:有没有办法将这两种类型分开?

最佳答案

不幸的是不可能:/

摘自 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.

关于ios - 仅允许访问 HTML5 中的相机设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13950437/

相关文章:

ios - swift 4 中的完成处理程序

iphone - 如何在iPhone的字符串中提取单个字节?

android - 如何更改 RNGoogleSigninButton 的文本?

html - 浏览器如何解决冲突的类?

linux - 如何直接从程序输出以填写网页上的表格?

ios uiimageview 点击手势在动画期间不起作用

css - 带有 CSS 的图像标题

javascript - jQuery 选择器无法与下拉菜单一起正常工作

java - 从文件中读取可变行数

c++ - Linux - 检测闲置