繁体   English   中英

将网络摄像机流式传输到Angular项目中的浏览器

[英]Streaming network camera into browser in a Angular Project

可以请我帮忙的任何人吗?我有一个连接在网络中的摄像机,只是一个IP摄像机,我需要在浏览器中显示它。

一些推论

我可以直接在视频标签中使用rtsp:// admin:Admin-123@192.168.0.252:554 URL尝试但不起作用

流提要是否需要服务器,所以使用wss的示例很多,是否有可能对wss没什么了解

这是否需要节点或Java转换格式或将其流式传输到浏览器

如果可能的话,可以ping一些教程链接或一些有用的东西

include the video directive like this:

<video #video width="640" height="480" autoplay></video>

then in your component:

@ViewChild('video') video:any; 
// note that "#video" is the name of the template variable in the video element

ngAfterViewInit() {
  let _video=this.video.nativeElement;
  if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
    navigator.mediaDevices.getUserMedia({ video: true })
                          .then(stream => {
                            _video.src = window.URL.createObjectURL(stream);
                            _video.play();
                          })
  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM