Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)