html5网络摄像头有问题 这是我的错误 Uncaught TypeError:未能对“URL”执行“createObjectURL”:未找到与提供的签名匹配的函数。 在照片js:17在
在照片.js:17分 video.src=供应商URL.createObjectURL(流)
请检查我的密码
非常感谢你!在
接受_照片.html在
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Document</title>
<link href="{% static 'css/photo.css' %}" rel="stylesheet">
</head>
<body>
<div class="booth">
<video id="video" width="400" height="300"></video>
<a href="#" id="capture" class="booth-capture-button">Take photo</a>
<canvas id="canvas" width="400" height="300"></canvas>
<img id="photo" src="http://placekitten.com/g/400/300" alt="photo of you">
</div>
<script src="{% static 'js/photo.js' %}"></script>
</body>
</html>
在照片.js在
^{pr2}$在照片.css在
.booth{
width:400px;
background-color: #ccc;
border:10px solid #ddd;
margin:0 auto;
}
.booth-capture-button {
display:block;
margin:10px 0;
padding:10px 20px;
background-color: cornflowerblue;
color: #fff;
text-align: center;
text-decoration: none;
}
#canvas {
display :none;
}
我只想制作网络摄像头 我想知道当我按下“take of you”按钮时,有没有一种方法可以将照片保存到文件夹中
请给我建议。非常感谢你。在
此错误是由于函数createObjectURL已弃用而导致的。您需要更新代码以直接将
srcObject
设置为video
对象。在相关问题 更多 >
编程相关推荐