欢迎使用 EbinPlayer 文档!这里包含了完整的使用指南、API参考和示例代码。
npm install ebin-player
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="node_modules/ebin-player/dist/styles.css">
</head>
<body>
<div id="player"></div>
<script src="node_modules/ebin-player/dist/ebin-player.umd.js"></script>
<script>
const player = new EbinPlayer(document.getElementById('player'), {
src: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
autoplay: false,
controls: true
});
</script>
</body>
</html>
import { createPlayer, PlaybackRatePlugin } from 'ebin-player';
const player = createPlayer(container, {
src: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
plugins: {
playbackRate: {
rates: [0.5, 1, 1.25, 1.5, 2]
}
},
theme: {
primaryColor: '#ff6b6b'
}
});
player.on('play', () => {
console.log('视频开始播放');
});
docs/
├── README.md # 文档首页
├── installation.md # 安装指南
├── quick-start.md # 快速开始
├── examples/ # 使用示例
│ ├── basic-player.md # 基础播放器
│ ├── custom-ui.md # 自定义UI
│ ├── plugin-development.md # 插件开发
│ ├── theming.md # 主题定制
│ └── advanced-features.md # 高级功能
├── api/ # API文档
│ ├── player-api.md # 播放器API
│ ├── plugin-api.md # 插件API
│ ├── ui-api.md # UI组件API
│ └── types.md # 类型定义
└── ../docs-api/ # 自动生成的API文档
欢迎贡献代码!请查看 贡献指南。