web 里嵌入是rtsp视频监控

电脑安装vlc插件
使用360浏览器

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>监控</title>
    <script src="./lib/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="./lib/plugins/bootstrap-3.3.7-dist/css/bootstrap.min.css"/>
    <style>
        #vlcEmb{
            width: 100%;
            height: 610px;
        }
    </style>
</head>
<body>
    <object  
      classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"   
      codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"  
      id="vlc"  
      name="vlc"  
      class="vlcPlayer"  
      events="True">  
        <param name="Src" value="rtsp://user:Dlyh@123@192.168.12.15" />
        <param name="ShowDisplay" value="True" />  
        <param name="AutoLoop" value="False" />  
        <param name="AutoPlay" value="True" />  
       <embed id="vlcEmb"  type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="640" height="480"  
         target="rtsp://user:aaa@123@192.168.12.14" ></embed>
    </objetc>  

</body>
<script>
var url = window.location.href;
var rtspUrl = url.split("=")
    $("#vlcEmb").attr("target",rtspUrl[1])
    // rtsp://[<username>[:<password>]@]<server-address-or-name>[:<port>][/<path>]"
    // vlc rtsp://admin:1992wuweibiao@192.168.1.64:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1


</script>
</html>
    原文作者:weijie
    原文地址: https://segmentfault.com/a/1190000019025972
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞