mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
Update README.md
This commit is contained in:
1 parent
d0939d5b65
commit
150e43d325
1 file changed
+86
-9
+86
-9
@@ -531,6 +531,89 @@ var art = new Artplayer({
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## subtitleOffset
|
||||||
|
|
||||||
|
- Type: `Boolean`
|
||||||
|
- Default: `false`
|
||||||
|
|
||||||
|
Subtitle time offset plugin
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
setting: true,
|
||||||
|
subtitleOffset: true,
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## miniProgressBar
|
||||||
|
|
||||||
|
- Type: `Boolean`
|
||||||
|
- Default: `false`
|
||||||
|
|
||||||
|
Mini progress bar plugin
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
miniProgressBar: true,
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## localPreview
|
||||||
|
|
||||||
|
- Type: `Boolean`
|
||||||
|
- Default: `false`
|
||||||
|
|
||||||
|
Local Preview plugin
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
localPreview: true,
|
||||||
|
controls: [
|
||||||
|
{
|
||||||
|
name: 'preview',
|
||||||
|
position: 'right',
|
||||||
|
html: 'OPEN',
|
||||||
|
mounted: $preview => {
|
||||||
|
art.plugins.localPreview.attach($preview);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## autoPip
|
||||||
|
|
||||||
|
- Type: `Boolean`
|
||||||
|
- Default: `false`
|
||||||
|
|
||||||
|
Auto pip mode plugin, when the video is playing and not triggering in the window view
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
autoPip: true,
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
## subtitle
|
## subtitle
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
@@ -868,7 +951,7 @@ setTimeout(function() {
|
|||||||
Player core function
|
Player core function
|
||||||
|
|
||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| ---------------------- | ---------- | ------------------------------------------------------------------------------------------------- |
|
| --------------------- | ---------- | ------------------------------------------------------------------------------------------------- |
|
||||||
| `aspectRatio` | `String` | Set aspect ratio, Currently only accepts three values:`default`, `4:3`, `16:9` and `false` |
|
| `aspectRatio` | `String` | Set aspect ratio, Currently only accepts three values:`default`, `4:3`, `16:9` and `false` |
|
||||||
| `aspectRatioReset` | `Boolean` | Recalculate the aspect ratio |
|
| `aspectRatioReset` | `Boolean` | Recalculate the aspect ratio |
|
||||||
| `attachUrl` | `Function` | Replace play address |
|
| `attachUrl` | `Function` | Replace play address |
|
||||||
@@ -1066,7 +1149,6 @@ Controls manager, and every control has `show` setter
|
|||||||
| `add` | `Function` | Dynamically add a control |
|
| `add` | `Function` | Dynamically add a control |
|
||||||
| `show` | `setter` | Show or hide |
|
| `show` | `setter` | Show or hide |
|
||||||
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -1102,7 +1184,6 @@ Contextmenu manager, and every contextmenu has `show` setter
|
|||||||
| `add` | `Function` | Dynamically add a contextmenu |
|
| `add` | `Function` | Dynamically add a contextmenu |
|
||||||
| `show` | `setter` | Show or hide |
|
| `show` | `setter` | Show or hide |
|
||||||
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -1129,7 +1210,6 @@ art.contextmenu.yourContextmenu.show = false;
|
|||||||
| `init` | `Function` | Init subtitle |
|
| `init` | `Function` | Init subtitle |
|
||||||
| `show` | `setter` | Show or hide |
|
| `show` | `setter` | Show or hide |
|
||||||
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -1152,19 +1232,17 @@ art.once('video:canplay', () => {
|
|||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ------------ |
|
| --------- | -------- | ------------ |
|
||||||
| `show` | `setter` | Show or hide |
|
| `show` | `setter` | Show or hide |
|
||||||
|
|
||||||
|
|
||||||
## mask
|
## mask
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
| propertie | type | Description |
|
| propertie | type | Description |
|
||||||
| --------- | ---------- | ----------- |
|
| --------- | -------- | ------------ |
|
||||||
| `show` | `setter` | Show or hide |
|
| `show` | `setter` | Show or hide |
|
||||||
|
|
||||||
|
|
||||||
## setting
|
## setting
|
||||||
|
|
||||||
Setting manager, and every setting has `show` and `hide` funciton
|
Setting manager, and every setting has `show` and `hide` funciton
|
||||||
@@ -1176,7 +1254,6 @@ Setting manager, and every setting has `show` and `hide` funciton
|
|||||||
| `add` | `Function` | Dynamically add a setting |
|
| `add` | `Function` | Dynamically add a setting |
|
||||||
| `show` | `setter` | Show or hide |
|
| `show` | `setter` | Show or hide |
|
||||||
|
|
||||||
|
|
||||||
[Run Code](/)
|
[Run Code](/)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in new issue
Block a user