(开源)基于vue、webpack搭建的GB28181国标流媒体服务前端-播放器组件搭建及使用...

开源资源

LiveGBS国标GB28181流媒体服务前端源码
https://github.com/livegbs/GB28181-Server

免费播放器LivePlayer

https://www.npmjs.com/package/@liveqing/liveplayer

安装播放器

npm install @liveqing/liveplayer

webpck.config.js 中配置

......
    // copy js lib and swf files to dist dir
    new CopyWebpackPlugin([
        { from: 'node_modules/@liveqing/liveplayer/dist/component/crossdomain.xml'},
        { from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer.swf'},
        { from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer-lib.min.js', to: 'js/'}
    ]),
......

编辑Vue组件


......

import LivePlayer from '@liveqing/liveplayer'

......
  components: {
    LivePlayer
  }
......


完整组件示例(CloudRecordVideoDlg.vue)






通过简单的几部操作,就可以在您的VUE前端中引入播放器,可以播放HLS、RTMP、HTTP-FLV等视频流。

转载于:https://www.cnblogs.com/marvin1311/p/11193502.html

你可能感兴趣的:((开源)基于vue、webpack搭建的GB28181国标流媒体服务前端-播放器组件搭建及使用...)