build:all

This commit is contained in:
Harvey Zack committed 2023-05-03 10:14:46 +08:00
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` 元素
@@ -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`
@@ -155,24 +155,6 @@ var art = new Artplayer({
});
```
## `title`
- Type: `String`
- Default: `''`
视频标题,目前会出现在 `视频截图` 下
<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: `[]`
因为不同的移动设备存在多种差异和限制,有时候你希望在某些移动设备上不使用本播放器,而是直接使用原生的功能时,可以通过该选项控制
白名单是一个数组类型,分别与 `window.navigator.userAgent` 进行匹配,只要其中一项匹配成功则启用播放器
支持 `字符串` 匹配, `函数` 匹配, `正则` 匹配
<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 提示
假如该选项不填,则默认使用本播放器
:::
## `thumbnails`
- Type: `Object`