build all packages

This commit is contained in:
zhw2590582 committed 2021-11-28 16:36:42 +08:00
1 parent b909f2f498
commit 7341d53c5c
19 files changed
+178 -93

No files matched your search

+37 -37
View File
@@ -1,20 +1,20 @@
---
title: 静态属性
title: Static property
sidebar_position: 5
slug: /class
---
:::tip 提示
:::tip Tip
静态属性存在于构造函数 `Artplayer` 上,和播放器实例没有直接关联
Static attributes exist in the constructor artplayer, and the player instance is not directly associated
:::
## instances
- 类型: `Array`
- Type: `Array`
一个保存了所有播放器实例的数组,当单个页面同时存在多个播放器时,可以通过这个属性进行管理多个实例
A array that saves all player instances, and can manage multiple instances through this property when multiple players exist at the same time.
<div className="run-code">▶ Run Code</div>
@@ -25,111 +25,111 @@ var art = new Artplayer({
});
art.on('ready', () => {
console.info(Artplayer.instances.length)
})
console.info(Artplayer.instances.length);
});
```
## version
- 类型: `String`
- Type: `String`
当前播放器版本号
Current player version number
<div className="run-code">▶ Run Code</div>
```js
console.info(Artplayer.version)
console.info(Artplayer.version);
```
## env
- 类型: `String`
- Type: `String`
当前播放器环境变量
Current player environment variable
<div className="run-code">▶ Run Code</div>
```js
console.info(Artplayer.env)
console.info(Artplayer.env);
```
## utils
- 类型: `Object`
- Type: `Object`
播放器的常用工具集
Common utils for player
<div className="run-code">▶ Run Code</div>
```js
console.info(Object.keys(Artplayer.utils))
console.info(Object.keys(Artplayer.utils));
```
## config
- 类型: `Object`
- Type: `Object`
存放了播放器的原生属性和方法
Store native properties and methods of video
<div className="run-code">▶ Run Code</div>
```js
console.info(Artplayer.config)
console.info(Artplayer.config);
```
## scheme
- 类型: `Object`
- Type: `Object`
播放器参数的校验方案
Verification scheme for player option
<div className="run-code">▶ Run Code</div>
```js
console.info(Artplayer.scheme)
console.info(Artplayer.scheme);
```
## validator
- 类型: `Function`
- Type: `Function`
播放器参数的校验器
Validator for player option
## option
- 类型: `Object`
- Type: `Object`
播放器默认参数
Player default option
<div className="run-code">▶ Run Code</div>
```js
console.info(Artplayer.option)
console.info(Artplayer.option);
```
## html
- 类型: `String`
- Type: `String`
播放器默认 `Html` 字符串,通常用于 `SSR` 的提前渲染,更多信息请访问 [配合SSR使用](/document/zh-cn/Questions/ssr)
Player defaults `HTML` String, usually used for `SSR`
<div className="run-code">▶ Run Code</div>
```js
console.info(Artplayer.html)
console.info(Artplayer.html);
```
## kindOf
- 类型: `Function`
- Type: `Function`
JS类型识别函数
JS type identification function
<div className="run-code">▶ Run Code</div>
```js
console.info(Artplayer.kindOf('0'))
console.info(Artplayer.kindOf(0))
console.info(Artplayer.kindOf({}))
console.info(Artplayer.kindOf([]))
```
console.info(Artplayer.kindOf('0'));
console.info(Artplayer.kindOf(0));
console.info(Artplayer.kindOf({}));
console.info(Artplayer.kindOf([]));
```