mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 03:51:25 -08:00
Update README.md
This commit is contained in:
1 parent
a9474b6bf1
commit
999636400e
1 file changed
+21
-22
+21
-22
@@ -743,7 +743,7 @@ var art = new Artplayer({
|
|||||||
html: '自定义菜单 - 天亮请关灯 Σ(っ °Д °;)っ',
|
html: '自定义菜单 - 天亮请关灯 Σ(っ °Д °;)っ',
|
||||||
click: function() {
|
click: function() {
|
||||||
document.querySelector('.video-wrap').classList.toggle('dark');
|
document.querySelector('.video-wrap').classList.toggle('dark');
|
||||||
this.hide();
|
this.show = false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -1018,8 +1018,7 @@ Layer manager, and every layer has `show` and `hide` funciton
|
|||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ----------------------- |
|
| --------- | ---------- | ----------------------- |
|
||||||
| `add` | `Function` | Dynamically add a layer |
|
| `add` | `Function` | Dynamically add a layer |
|
||||||
| `show` | `Function` | Show all layers |
|
| `show` | `setter` | Show or hide |
|
||||||
| `hide` | `Function` | Hide all layers |
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
@@ -1041,20 +1040,20 @@ art.layers.add({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
art.layers.yourLayer.hide();
|
art.layers.yourLayer.show = false;
|
||||||
```
|
```
|
||||||
|
|
||||||
## controls
|
## controls
|
||||||
|
|
||||||
Controls manager, and every control has `show` and `hide` funciton
|
Controls manager, and every control has `show` setter
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ------------------------- |
|
| --------- | ---------- | ------------------------- |
|
||||||
| `add` | `Function` | Dynamically add a control |
|
| `add` | `Function` | Dynamically add a control |
|
||||||
| `show` | `Function` | Show all controls |
|
| `show` | `setter` | Show or hide |
|
||||||
| `hide` | `Function` | Hide all controls |
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
@@ -1077,20 +1076,20 @@ art.controls.add(function yourController(art) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
art.controls.yourController.hide();
|
art.controls.yourController.show = false;
|
||||||
```
|
```
|
||||||
|
|
||||||
## contextmenu
|
## contextmenu
|
||||||
|
|
||||||
Contextmenu manager, and every contextmenu has `show` and `hide` funciton
|
Contextmenu manager, and every contextmenu has `show` setter
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ----------------------------- |
|
| --------- | ---------- | ----------------------------- |
|
||||||
| `add` | `Function` | Dynamically add a contextmenu |
|
| `add` | `Function` | Dynamically add a contextmenu |
|
||||||
| `show` | `Function` | Show all contextmenu |
|
| `show` | `setter` | Show or hide |
|
||||||
| `hide` | `Function` | Hide all contextmenu |
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
@@ -1106,7 +1105,7 @@ art.contextmenu.add({
|
|||||||
name: 'yourContextmenu',
|
name: 'yourContextmenu',
|
||||||
});
|
});
|
||||||
|
|
||||||
art.contextmenu.yourContextmenu.hide();
|
art.contextmenu.yourContextmenu.show = false;
|
||||||
```
|
```
|
||||||
|
|
||||||
## subtitle
|
## subtitle
|
||||||
@@ -1116,8 +1115,8 @@ art.contextmenu.yourContextmenu.hide();
|
|||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ------------- |
|
| --------- | ---------- | ------------- |
|
||||||
| `init` | `Function` | Init subtitle |
|
| `init` | `Function` | Init subtitle |
|
||||||
| `show` | `Function` | Show subtitle |
|
| `show` | `setter` | Show or hide |
|
||||||
| `hide` | `Function` | Hide subtitle |
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
@@ -1142,8 +1141,8 @@ art.once('video:canplay', () => {
|
|||||||
|
|
||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ------------ |
|
| --------- | ---------- | ------------ |
|
||||||
| `show` | `Function` | Show loading |
|
| `show` | `setter` | Show or hide |
|
||||||
| `hide` | `Function` | Hide loading |
|
|
||||||
|
|
||||||
## mask
|
## mask
|
||||||
|
|
||||||
@@ -1151,8 +1150,8 @@ art.once('video:canplay', () => {
|
|||||||
|
|
||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ----------- |
|
| --------- | ---------- | ----------- |
|
||||||
| `show` | `Function` | Show mask |
|
| `show` | `setter` | Show or hide|
|
||||||
| `hide` | `Function` | Hide mask |
|
|
||||||
|
|
||||||
## setting
|
## setting
|
||||||
|
|
||||||
@@ -1163,8 +1162,8 @@ Setting manager, and every setting has `show` and `hide` funciton
|
|||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ------------------------- |
|
| --------- | ---------- | ------------------------- |
|
||||||
| `add` | `Function` | Dynamically add a setting |
|
| `add` | `Function` | Dynamically add a setting |
|
||||||
| `show` | `Function` | Show setting |
|
| `show` | `setter` | Show or hide |
|
||||||
| `hide` | `Function` | Hide setting |
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
@@ -1180,7 +1179,7 @@ art.setting.add({
|
|||||||
name: 'yourSetting',
|
name: 'yourSetting',
|
||||||
});
|
});
|
||||||
|
|
||||||
art.setting.yourSetting.hide();
|
art.setting.yourSetting.show = false;
|
||||||
```
|
```
|
||||||
|
|
||||||
## plugins
|
## plugins
|
||||||
@@ -1332,7 +1331,7 @@ var art = new Artplayer({
|
|||||||
customType: {
|
customType: {
|
||||||
torrent: function(video, url, art) {
|
torrent: function(video, url, art) {
|
||||||
var client = new WebTorrent();
|
var client = new WebTorrent();
|
||||||
art.loading.show();
|
art.loading.show = true;
|
||||||
client.add(url, function(torrent) {
|
client.add(url, function(torrent) {
|
||||||
var file = torrent.files[0];
|
var file = torrent.files[0];
|
||||||
file.renderTo(video, {
|
file.renderTo(video, {
|
||||||
|
|||||||
Reference in new issue
Block a user