我正在尝试关闭如下创建的视频
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia({ video: true }).then(function (s) {
stream = s;
video.src = window.URL.createObjectURL(stream);
video.play();
});
}
//if i use
document.getElementById('video');
//the div look like these:
<video id="video" style="width:100%; height:100%;" autoplay="" src="blob:http://localhost:xxxx/4456960"></video>
主要问题是我无法访问视频流...如何停止/释放相机?