可以请任何人帮助我的要求,我有一个摄像头连接在网络上,简单的IP摄像头,我需要显示它在browser.Simply实时馈送到浏览器
一些推论..
我可以直接在视频标签中使用rtsp://admin:Admin-123@192.168.0.252:554 URL吗
流式传输提要需要服务器吗?这么多使用wss的示例有必要吗?可能对wss一无所知。
这是否需要节点或java来转换格式或将其流式传输到浏览器
如果可能,我可以ping一些教程、链接或其他有用的东西
发布于 2018-09-26 14:42:58
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();
})
}
}https://stackoverflow.com/questions/52511397
复制相似问题