调用video.play()报错Uncaught (in promise) DOMException
解决办法 video.play()放于video.onloadedmetadata内部
//video.play(); 报错
video.onloadedmetadata = function () {
video.play();
console.log('打开摄像头');
};
调用video.play()报错Uncaught (in promise) DOMException
解决办法 video.play()放于video.onloadedmetadata内部
//video.play(); 报错
video.onloadedmetadata = function () {
video.play();
console.log('打开摄像头');
};