input file capture
body {font-family: Arial, Roboto, 'Droid Sans', 'Hiragino Sans GB', 'Microsoft YaHei', 'Simsun', STXihei, 'sans-serif';font-size: 14px;}
dl:not(:last-child) {overflow: hidden;padding: 10px;margin-bottom: 10px;border-bottom: 1px dashed #dedede;}
dt {padding-bottom: 10px;font-weight: bold;color: #f32600;}
dd {margin: 0;padding:5px 0 0 20px;border-left: 2px solid #cddc39;}
普通没有 capture 属性
没有 capture 捕获属性时,仅为选择上传文件。
capture="" 为空的时候
当 capture 捕获属性为空时,基于 capture 的值为布尔值类型,所以这个时候可以看到启用了摄像头,后置摄像头开启拍照或者录像功能。
capture="user" 前置摄像头
当 capture 捕获属性为 user 时,开启前置摄像头的拍照或者录像功能。
类型:视频 多个文件
选择多个视频类型文件,未使用 capture 属性时。
类型:图片 多个文件
选择多个图片类型文件,未使用 capture 属性时。
无类型要求 多个文件
选择多个视频或者图片类型文件,未使用 capture 属性时。
capture="user" 前置摄像头 视频
使用 capture="user" 开启前置摄像头时,设定为视频类型文件,手机中不会显示照片,同时 multiple 多文件上传无效。
capture="user" 前置摄像头 图片
使用 capture="user" 开启前置摄像头时,设定为图片类型文件,手机中不会显示视频,同时 multiple 多文件上传无效。
百度人脸识别记录(2):熟悉H5 capture 调用摄像头
关注
打赏