前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >webrtc-streamer-v0.7.1-dirty-Windows-AMD64-Release 下载

webrtc-streamer-v0.7.1-dirty-Windows-AMD64-Release 下载

作者头像
收心
发布2024-07-24 13:57:37
1070
发布2024-07-24 13:57:37
举报
文章被收录于专栏:Java实战博客

网盘里边只有window版本 其他版本到github上下载

百度网盘下载地址

前端使用

第一步、下载压缩包并解压

第二步、启动文件里边的 webrtc-streamer.exe 服务 双击即可

第三部、前端项目使用

1、把压缩包html文件夹下的webrtcstreamer.js文件和html/libs文件夹下adapter.min.js文件复制到VUE项目public目录下

2、在public目录下的index.html 中使用script标签引入上边两个js文件

<script type="text/javascript" src="<%= BASE_URL %>adapter.min.js"></script>

<script type="text/javascript" src="<%= BASE_URL %>webrtcstreamer.js"></script>

3、在.vue文件中使用

<template>

<div>

<!-- <a-button @click="handleChange">切换</a-button> -->

<video id="video" autoplay ></video>

</div>

</template>

<script>

export default {

name: 'index1',

data() {

return {

webRtcServer: null//webRtcServer上下文

}

},

mounted() {

//video:需要绑定的video控件ID

//127.0.0.1:8000:启动webrtc-streamer的设备IP和端口,默认8000

this.webRtcServer = new WebRtcStreamer('video', location.protocol + '//127.0.0.1:8000')

//需要查看的rtsp地址,地址为财物系统地址

this.webRtcServer.connect('rtsp://admin:abcd1234@192.168.0.188:554/Streaming/Channels/101')

},

beforeDestroy() {

this.webRtcServer.disconnect()

this.webRtcServer = null

},

methods: {

/**

* 有多个视频源的情况下,直接调用服务的connect方法即可

*/

handleChange() {

this.webRtcServer.connect('rtsp://admin:admin@192.168.23.80:554/1/1')

}

}

}

</script>

<style scoped></style>

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-07-23,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档