旁观自己 善待朝夕|

猫老板的豆

园龄:9年4个月粉丝:52关注:0

纯html5调用手机摄像头

纯html5,并且不涉及js,实现调用手机摄像头

<!--打开相机-->
<input type="file" accept="image/*" capture="camera">  

<!--打开摄像-->
<input type="file" accept="video/*" capture="camcorder">

<!--打开录音-->
<input type="file" accept="audio/*" capture="microphone">

<!--可以支持多选-->
<input type="file" accept="image/*" multiple>

accept 表示直接打开系统文件目录。
capture表示可以捕获到系统默认的设备。
multiple表示可以支持多选,如:
加上这个multiple后,capture就没啥用了,因为multiple是专门用来支持多选的。


本文作者:猫老板的豆

本文链接:https://www.cnblogs.com/bingcola/p/16499304.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   猫老板的豆  阅读(510)  评论(1编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.