Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dblate/larkplayer-ui
Custom style for larkplayer
https://github.com/dblate/larkplayer-ui
custom-styling larkplayer larkplayer-ui
Last synced: 12 days ago
JSON representation
Custom style for larkplayer
- Host: GitHub
- URL: https://github.com/dblate/larkplayer-ui
- Owner: dblate
- License: mit
- Created: 2018-05-04T08:04:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T15:44:23.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T07:48:17.445Z (23 days ago)
- Topics: custom-styling, larkplayer, larkplayer-ui
- Language: JavaScript
- Homepage:
- Size: 4.02 MB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# larkplayer-ui
为 [larkplayer](https://github.com/dblate/larkplayer) 提供自定义样式
* 组件化
* 支持 jsx 语法
* 自适应 pc 与移动端*注意:此插件会修改 controls 方法:*
* *修改前:player.controls() 返回或控制 video 标签的 controls 属性*
* *修改后:player.controls() 返回或控制当前自定义样式是否展示。video 标签上的 controls 属性会被移除**注意:此插件会新增 controlsshow controlshide 事件,用以同步控制条显隐状态
## 截图
PC
MOBILE
## 下载
NPM
```shell
npm install larkplayer-ui
```CDN
```javascript
```
## 使用
#### script
```javascript
larkplayer custom style
var width = Math.min(document.body.clientWidth, 640);
var player = larkplayer('video-el', {
width: width,
height: width * 9 / 16
});
```
#### 模块化
```javascript
import larkplayer from 'larkplayer';
import 'larkplayer-ui';const player = larkplayer('video-el-id');
```## License
larkplayer-ui is [MIT licensed](./LICENSE)