[英]How can I open camera on mobile phone on a web app?
I'm having a trouble on accessing the camera on my mobile device through web app.我在通过 Web 应用程序访问移动设备上的相机时遇到问题。 In web, the camera works fine, but when I use my mobile device, the camera wont show BUT when I add https://
in the url the camera will show and be available to access.在网络中,摄像头工作正常,但是当我使用移动设备时,当我在 url 中添加https://
时,摄像头不会显示但摄像头将显示并可访问。 how can I solve this problem?我怎么解决这个问题? I need to access my mobile camera.我需要访问我的移动相机。
I'm working on a QR Code.我正在处理二维码。 In Web it works fine.在 Web 中它工作正常。 but when in camera I need to type https://
on the url to access the camera.但是在相机中时,我需要在网址上输入https://
才能访问相机。
How can i solve this?我该如何解决这个问题? do I need to add any functions?我需要添加任何功能吗?
Taking a look at https://developers.google.com/web/fundamentals/media/capturing-images/ you can find a warning as follows: 看看https://developers.google.com/web/fundamentals/media/capturing-images/,您会发现以下警告: So no. 所以不行。 The only way to 'solve' your problem is to use HTTPS. 解决问题的唯一方法是使用HTTPS。
https 中的约束是否与 chrome 相关(因此可以通过其他浏览器克服)还是与 android 相关,因此不能以这种方式传递?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.