赞
踩
webrtc streamer
- {
- "urls":{
- "dahua": {"video": "rtsp://用户名:密码@摄像头ip:554/cam/realmonitor?channel=1&subtype=0"},
- "yingshi": {"video": "rtsp://用户名:密码@摄像头ip:554/h264/ch1/sub/av_stream"},
- }
- }
webrtc-streamer.exe -C config.json
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- <script type="text/javascript" src="./static/webrtcstreamer.js"></script>
- <script type="text/javascript" src="./static/adapter.min.js"></script>
- </head>
- <body>
- <div id="app"></div>
- </body>
- </html>
- <template>
- <div class="models">
- <el-row :gutter="24">
- <el-col :span="12">
- <video id="video" autoplay controls width="570" height="280"></video>
- </el-col>
- <el-col :span="12">
- <video id="video1" autoplay controls width="570" height="280"></video>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- export default {
- name: "video",
- data() {
- return {};
- },
- mounted() {
- var webRtcServer = new WebRtcStreamer(
- "video",
- "http://192.168.161.160:8000"
- );
- var webRtcServer1 = new WebRtcStreamer(
- "video1",
- "http://192.168.161.160:8000"
- );
- webRtcServer.connect("dahua");
- webRtcServer1.connect("yingshi");
- },
- };
- </script>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。