<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
capture="camera"
<input type="file" accept="image/*" capture="camera" />
<br />
capture="environment"
<input type="file" accept="image/*" capture="environment" />
capture="user"
<input type="file" accept="image/*" capture="user" />
Austin Gil设置了“environment”和“user”两个标签。
点击“environment”,可以调用相机的后置镜头,且可以录像; 点击“user”,可以打开相机前置镜头拍照。
<br />
<input type="file" id="environment" capture="environment" accept="video/*" />
</body>
</html>
h5 原生js 调用摄像头
最新推荐文章于 2023-12-26 17:22:04 发布