mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 07:46:17 -08:00
update docs
This commit is contained in:
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(),
|
||||
],
|
||||
});
|
||||
``
|
||||
Reference in new issue
Block a user