基本上,我想在网页上展示IP摄像头的实况,我是一个全新的人。
try to use nuget package manager
发布于 2022-03-03 04:59:20
我使用了视频元素
<video autoplay></video>
和一些java脚本
const video = document.querySelector('video');
function hasGetUserMedia() {
return !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia);
}
if (hasGetUserMedia()) {
const constraints = {
video: true
};
navigator.mediaDevices.getUserMedia(constraints).
then((stream) => { video.srcObject = stream; video.play(); }).catch((err) => { alert(err.message);});
} else {
alert('Video capture is not supported by your browser');
}
https://stackoverflow.com/questions/71332142
复制相似问题