alpha-video-player2d
v1.0.1
Published
```sh npm i alpha-video-player2d --save ```
Readme
安装
npm i alpha-video-player2d --save使用
import AlphaVideoPlayer2D from 'alpha-video-player2d'
const video = new AlphaVideoPlayer2D({
url: 'video.mp4',
el: document.getElementById('player-container'),
width: 375,
height: 1080,
loop: true,
autoplay: true,
})参数
interface IOptions {
url: string; // 视频地址
el: HTMLCanvasElement | HTMLElement; // 视频容器或画布
width: number; // 视频宽度的一半
height: number; // 视频高度
loop?: boolean;
autoplay?: boolean;
loadedCallback?: Function;
endCallback?: Function;
}