Update Options.md

This commit is contained in:
zhw2590582 committed 2021-11-25 21:21:18 +08:00
1 parent f4d3c77c6c
commit a1671fce5a
1 file changed
+50 -4
@@ -371,11 +371,10 @@ var art = new Artplayer({
| ------- | ------------- |
| `↑` | 增加音量 |
| `↓` | 降低音量 |
| `←` | 快进5秒 |
| `→` | 快退5秒 |
| `←` | 快进 5 秒 |
| `→` | 快退 5 秒 |
| `space` | 切换播放/暂停 |
:::tip 提示
只在播放器获得焦点后(如点击了播放器后),该快捷键才会生效
@@ -728,8 +727,51 @@ var art = new Artplayer({
## plugins
- 类型: `Array`
- 默认: `[]`
初始化自定义的插件,更多信息请访问 [自定义插件的使用](/document/zh-cn/Questions/plugin)
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
plugins: [
function myPlugin(art) {
console.info('myPlugin running...');
return {
something: 'something',
doSomething: function () {
console.info('Do something here...');
},
};
},
],
});
```
## whitelist
- 类型: `Array`
- 默认: `[]`
因为不同的移动设备存在多种差异和限制,所以本播放器默认在移动设备上使用原生方法挂载视频,假如你想在移动设备上使用本播放器,需要手动开启白名单
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
whitelist: ['iPhone OS 11'],
// whitelist: ['*'],
// whitelist: [(ua) => /iPhone OS 11/gi.test(ua)],
// whitelist: [/iPhone OS 11/gi]
});
```
## switcher
## thumbnails
@@ -742,4 +784,8 @@ var art = new Artplayer({
## customType
## lang
## lang
```
```