mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-31 04:31:20 -08:00
build:all
This commit is contained in:
1 parent
283861b198
commit
5959eb4669
137 files changed
+1869
-2351
No files matched your search
@@ -23,29 +23,6 @@ console.info(art.option);
|
||||
|
||||
:::
|
||||
|
||||
## `whitelist`
|
||||
|
||||
管理移动设备的白名单功能,只有一个属性 `state` 返回是否启用播放器功能
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
whitelist: [(ua) => /iPhone/gi.test(ua)],
|
||||
});
|
||||
|
||||
console.info(art.whitelist.state);
|
||||
```
|
||||
|
||||
:::warning 提示
|
||||
|
||||
在上面这个例子中,当使用 `iPhone` 访问播放器时,`art.whitelist.state` 会返回 `false`,即使用原生的播放器,而不是 `Artplayer` 播放器
|
||||
|
||||
:::
|
||||
|
||||
|
||||
## `template`
|
||||
|
||||
管理播放器所有的 `DOM` 元素
|
||||
|
||||
@@ -155,24 +155,6 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## `title`
|
||||
|
||||
- Type: `String`
|
||||
- Default: `''`
|
||||
|
||||
Video title, which currently appears in `video screenshot`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js{4}
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
title: 'your-video-title',
|
||||
screenshot: true,
|
||||
});
|
||||
```
|
||||
|
||||
## `theme`
|
||||
|
||||
- Type: `String`
|
||||
@@ -857,35 +839,6 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## `whitelist`
|
||||
|
||||
- Type: `Array`
|
||||
- Default: `[]`
|
||||
|
||||
Because different mobile devices have many differences and limitations, sometimes you want to use native functions directly instead of using this player on some mobile devices, you can use this option to control
|
||||
|
||||
The whitelist is an array type, which is matched with `window.navigator.userAgent` respectively. The player will be enabled as long as one of the matches is successful
|
||||
|
||||
Support `string` matching, `function` matching and `regular` matching
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js{4}
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
whitelist: [(ua) => /iPhone/gi.test(ua)],
|
||||
// whitelist: [/iPhone/gi],
|
||||
// whitelist: ['iPhone'],
|
||||
});
|
||||
```
|
||||
|
||||
:::warning Tip
|
||||
|
||||
If this option is not filled in, the player will be used by default
|
||||
|
||||
:::
|
||||
|
||||
## `thumbnails`
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
Reference in new issue
Block a user