Vue 프로젝트에서 m3u8 형식 비디오를 재생하는 방법
종속성 설치
npm install @easydarwin/easyplayer --save
npm install copy-webpack-plugin@5.1.2 --save-dev
public/index.html 찾기
node_modeols의 @easydarwin에서 dist/compent/EasyPlayer-lib.min.js 및 EasyPlayer.wasm 파일을 찾아 pubilc 디렉터리에 복사합니다.
소개하다
<script src="./EasyPlayer-lib.min.js"></script>
다시 놀 수 있는 곳
1. 소개
import EasyPlayer from "@easydarwin/easyplayer"
2. 등록
구성요소에서
components:{
EasyPlayer}
3. 컴포넌트 사용
템플릿에서
<EasyPlayer :id="Math.floor(Math.random()*1+1)" :videoUrl=item :live="true" />