update docs

This commit is contained in:
Harvey Zack committed 2023-01-01 00:30:01 +08:00
1 parent ac490964eb
commit 78d22e4e54
62 files changed
+293 -189

No files matched your search

@@ -53,3 +53,37 @@ var art = new Artplayer({
],
});
```
## Api
### enable
- Type: `Getter/Setter`
Whether to enable the new control UI
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-control/index.js">
▶ Run Code
</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
fullscreen: true,
fullscreenWeb: true,
controls: [
{
position: 'right',
html: '<button type="button">Switcher UI</button>',
click: function () {
const { enable } = art.plugins.artplayerPluginControl;
art.plugins.artplayerPluginControl.enable = !enable;
},
},
],
plugins: [
artplayerPluginControl(),
],
});
``
@@ -1,5 +1,5 @@
---
title: 控制栏插件
title: 控制器插件
sidebar_position: 5
---
@@ -53,3 +53,37 @@ var art = new Artplayer({
],
});
```
## 接口
### enable
- 类型: `Getter/Setter`
是否启用新的控制器UI
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-control/index.js">
▶ Run Code
</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
fullscreen: true,
fullscreenWeb: true,
controls: [
{
position: 'right',
html: '<button type="button">切换 UI</button>',
click: function () {
const { enable } = art.plugins.artplayerPluginControl;
art.plugins.artplayerPluginControl.enable = !enable;
},
},
],
plugins: [
artplayerPluginControl(),
],
});
``