mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 19:41:25 -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
|
||||
|
||||
- Type: `Object`
|
||||
@@ -868,7 +951,7 @@ setTimeout(function() {
|
||||
Player core function
|
||||
|
||||
| propertie | type | Description |
|
||||
| ---------------------- | ---------- | ------------------------------------------------------------------------------------------------- |
|
||||
| --------------------- | ---------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `aspectRatio` | `String` | Set aspect ratio, Currently only accepts three values:`default`, `4:3`, `16:9` and `false` |
|
||||
| `aspectRatioReset` | `Boolean` | Recalculate the aspect ratio |
|
||||
| `attachUrl` | `Function` | Replace play address |
|
||||
@@ -1066,7 +1149,6 @@ Controls manager, and every control has `show` setter
|
||||
| `add` | `Function` | Dynamically add a control |
|
||||
| `show` | `setter` | Show or hide |
|
||||
|
||||
|
||||
[Run Code](/)
|
||||
|
||||
```js
|
||||
@@ -1102,7 +1184,6 @@ Contextmenu manager, and every contextmenu has `show` setter
|
||||
| `add` | `Function` | Dynamically add a contextmenu |
|
||||
| `show` | `setter` | Show or hide |
|
||||
|
||||
|
||||
[Run Code](/)
|
||||
|
||||
```js
|
||||
@@ -1129,7 +1210,6 @@ art.contextmenu.yourContextmenu.show = false;
|
||||
| `init` | `Function` | Init subtitle |
|
||||
| `show` | `setter` | Show or hide |
|
||||
|
||||
|
||||
[Run Code](/)
|
||||
|
||||
```js
|
||||
@@ -1152,19 +1232,17 @@ art.once('video:canplay', () => {
|
||||
- Type: `Object`
|
||||
|
||||
| propertie | type | Description |
|
||||
| --------- | ---------- | ------------ |
|
||||
| --------- | -------- | ------------ |
|
||||
| `show` | `setter` | Show or hide |
|
||||
|
||||
|
||||
## mask
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
| propertie | type | Description |
|
||||
| --------- | ---------- | ----------- |
|
||||
| --------- | -------- | ------------ |
|
||||
| `show` | `setter` | Show or hide |
|
||||
|
||||
|
||||
## setting
|
||||
|
||||
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 |
|
||||
| `show` | `setter` | Show or hide |
|
||||
|
||||
|
||||
[Run Code](/)
|
||||
|
||||
```js
|
||||
|
||||
Reference in new issue
Block a user