播放RTSP视频的HTML页面(和播放器)

时间:2018-07-20 06:27:54

标签: html5 rtsp rtsp-client

我想在我的网页上运行RTSP实时视频流。以下代码与rtsp // url一起工作,如代码所示,但是当我用我的cam IP替换该URL时,它不能cam IP链接正在VLC播放器中播放,但不在我的HTML PAGE中播放。

How can I display an RTSP video stream in a web page? 与我要询问的内容有关,但并不能帮助我找到解决方案。 有什么解决办法吗?

谢谢。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Streamedian player example</title>
    <style>
        #test_video {
            width: 720px;
        }
    </style>
</head>
<body>
<video id="test_video" controls autoplay>    
   <source src="rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov" 
     type="application/x-rtsp">       
   <!-- <source src="rtsp://admin:abc@myIPAddress/" 
          type="application/x-rtsp">-->
</video>   
<script src="https://cdn.bootcss.com/babel-polyfill/7.0.0-beta.2/polyfill.min.js"></script>
<script src="streamedian.min.js"></script>
<script>
    var p = Streamedian.player('test_video', {socket:  "wss://specforge.com/ws/"})
</script>
</body>
</html>

0 个答案:

没有答案
相关问题