如何在Webview上启用前置摄像头?我在AndroidManifest.xml中启用了这些功能
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.front" android:required="true" />
相机不会用于拍照或录制,只是打开前置摄像头 .
当我使用手机浏览器访问网站时,手机摄像头工作一次允许提示信息 . 如何使用webview?
在html文件中有一个显示网络摄像头的Canvas和Video标签它不会记录或拍摄它只是显示摄像机视图 .
Here is the html code
<canvas id="inCanvas" width="500" height="500" style="display:none"></canvas>
<video id="inputVideo" width="100" height="100" autoplay loop ></video>
它适用于网络摄像头,但不适用于android中的webview .
2 回答
我不太明白,但我可能会有以下两种中的一种,你想要什么 .
html:
js:
here是doc .
我会使用类似下面的东西作为访问手机摄像头的脚本 .
用the following教程来帮助我 . 希望它在正确的轨道上设置yuo :)