简体   繁体   English

如何在android中使用javascript和html5打开相机?

[英]how to open camera using javascript and html5 in android?

could you please tell me how to open camera using javascript and html5 in android ? 你能告诉我如何在android中使用javascript和html5打开相机吗? I saw https://m.facebook.com/ on my android phone when I click on photo button it gives me camera option so how I will achieve the same functionality in our application 我在Android手机上看到https://m.facebook.com/当我点击照片按钮时它给了我相机选项,所以我将如何在我们的应用程序中实现相同的功能

I saw this 我看见了这个

<input type="file" accept="image/*;capture=camera">

but it not work only for me it open only the gallery where I select only image .there is no option of camera 但它不适用于我只打开我只选择图像的画廊。没有相机的选项

https://www.html5rocks.com/en/tutorials/getusermedia/intro/ https://www.html5rocks.com/en/tutorials/getusermedia/intro/

<input type="file" accept="image/*" capture="camera" />

你忘了标记输入标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM