赞
踩
问题原因:EasyPlayer只兼容了vue2版本,在vue2版本可以使用npm引入的方式使用,在vue3版本不支持此方式使用,只能通过script引入的方式使用
解决方案:
1、先下载EasyPlayer的npm包
npm i @easydarwin/easyplayer
2、在node_modules中按照以下路径找到@easydarwin/easyplayer/dist/component/EasyPlayer-component.min.js 拷贝到 public 下面
3、在index.html里面使用
4、直接在对应的vue文件里面使用
5、最重要的一步,因为EasyPlayer是基于video.js实现的,如果你的项目中没有引入video.js,即使按照以上方法操作了也会导致不能正常使用可通过npm引入video.js,无需在main.js里面引入
$ npm install video.js
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。