wplayer-next
v1.0.1
Published
Wow, such a lovely HTML5 danmaku video player
Downloads
69
Readme
WPlayer 弹幕播放器
WPlayer 是基于 DPlayer 1.27.1 开发的弹幕播放器,具体内容请参考官方文档
安装
使用 npm:
npm install wplayer-next --save
使用 Yarn:
yarn add wplayer-next
快速开始
加载播放器文件:
<div id="wplayer"></div>
<script src="WPlayer.min.js"></script>
或者使用模块管理器:
import WPlayer from 'wplayer-next';
const player = new WPlayer(options);
在 js 里初始化:
const player = new WPlayer({
container: document.getElementById('wplayer'),
video: {
url: 'demo.mp4',
},
});