【发布时间】:2013-07-21 10:49:00
【问题描述】:
我正在使用
<input type="file" accept="image/*;capture=camera">
从用户相机获取图像输入。这是apparently the old way of doing it,但这正是他们想要的。
有没有办法指定应该使用前置(或后置)摄像头?如果需要,用户仍然可以切换摄像头,但默认摄像头将在 html 中设置(可能作为属性?)。
我只在 Android 上的 Chrome 上需要这个,所以跨浏览器不是问题。
Media Capture docs 说用户应该能够选择哪个相机,但它没有说明开发人员:
Similarly, the user agent should allow the user:
-to select the exact media capture device to be used if there exists multiple devices of the same type (e.g. a front-facing camera in addition to a primary camera).
【问题讨论】:
标签: html google-chrome webrtc