工程环境:
vue cli3/cli4
plugin: vue-video-player
感谢surmon大神的 vue-video-player , 它是适用于 Vue 的video.js播放器组件
common environment:
安装&引用vue-video-player
common ques:
页面多个video(v-for实现), playerOption请使用函数
CLI引入:
打开github 搜索 vue-video-player 如下图
Npm 安装
npm install vue-video-player --save
Mount with global
Mount with component
1、播放rtmp
播放rtmp需要借助flash,尽管flash马上要被各大浏览器抛弃,但在抛弃之前还是一种不错的解决方案。
在github页面底部有对应的插件地址 如下图
安装 videojs-flash