Update README.md

This commit is contained in:
zhw2590582 committed 2019-09-08 13:02:07 +08:00
1 parent d0939d5b65
commit 150e43d325
1 file changed
+87 -10
+87 -10
View File
@@ -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,18 +1232,16 @@ 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
@@ -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