【问题标题】:Is there a way to specify which camera input type='file' should use?有没有办法指定应该使用哪个相机输入类型='文件'?
【发布时间】: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


    【解决方案1】:

    7 月 7 日,一位 Google 开发者的官方回应称这还不可能:https://groups.google.com/d/msg/discuss-webrtc/i07T1X_DY94/fVE5_vYK6sAJ

    【讨论】:

      猜你喜欢
      • 2014-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-03
      • 1970-01-01
      • 1970-01-01
      • 2013-11-19
      • 2011-11-20
      相关资源
      最近更新 更多