gpt4 book ai didi

html - 有没有办法指定 ='file' 应该使用哪种相机输入类型?

转载 作者:可可西里 更新时间:2023-11-01 13:12:43 26 4
gpt4 key购买 nike

我正在使用

<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).

最佳答案

Google 开发人员在 7 月 7 日的官方回复说这还不可能:https://groups.google.com/d/msg/discuss-webrtc/i07T1X_DY94/fVE5_vYK6sAJ

关于html - 有没有办法指定 ='file' 应该使用哪种相机输入类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17792026/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com