简体   繁体   English

如何在网络应用程序上打开手机上的相机?

[英]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.

相关问题 通过渐进式 web 应用在手机上打开相机 - Open camera on mobile via progressive web app 如何阻止我的用户在他们的手机上打开我的 React Native 应用程序,直到他们不会打开他们的 wifi 或移动数据? - How can I stop my user to open my React Native app on their phone until they will not turn on their wifi or mobile data? 如果网页正在移动设备上打开如何在反应 js web 应用程序中打开电话屏幕 - if webpage is being opened on a mobile device how to open phone call screen in react js web app 如何使用 webcam.js 在移动设备中打开后置摄像头? - How can I open rear camera in mobile device using webcam.js? 如何检测移动浏览器或应用程序是否打开了网页? - How can I detect if a web page is opened by a mobile browser or an app? 如何从 web 页面打开 android 联系人应用程序? - How can I open android contact app from web page? 如何在手机间隙中打开图库而不是相机? - How to open gallery instead of camera in phone gap? 如何从Web应用程序打开Goog​​le Maps移动应用程序 - How to open Google Maps mobile App from a Web application 在android中使用expo go app时无法打开手机相机? - can't open mobile camera while using expo go app in android? 如何通过网络应用访问我的安卓智能手机的前后摄像头? - How can I access my android smartphone's both front and rear camera through a web app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM