1.安装插件
npm install @easydarwin/easyplayer --save
2.配置js文件
copy node_modules/@easydarwin/easyplayer/dist/component/EasyPlayer.swf 到 静态文件 根目录public/下
copy node_modules/@easydarwin/easyplayer/dist/component/crossdomain.xml 到 静态文件 根目录public/下
copy node_modules/@easydarwin/easyplayer/dist/component/EasyPlayer-lib.min.js 到 静态文件 根目录public/下
3.vue使用
import EasyPlayer from "@easydarwin/easyplayer";
<EasyPlayer :videoUrl="videoUrl" live autoplay stretch ref="easyPlayer" class="video-js"></EasyPlayer>
直接给videoUrl赋值就可以了
文档属性参考https://gitcode.net/mirrors/tsingsee/EasyPlayer.js/-/tree/master/demo