我目前正在使用 HTML5 中的 iphone 相机开发应用程序
<input type="file" accept="capture=camera">
问题是我有一个小列表,可以让我在我的图书馆和我的相机之间做出选择。
我的想法是有两个按钮,一个用于图书馆,另一个用于相机。
我知道只给图书馆不给相机的方法。
问题:有没有办法将这两种类型分开?
最佳答案
不幸的是不可能:/
摘自 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/