mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
Update class.md
This commit is contained in:
1 parent
2d16171720
commit
a0e13479d3
1 file changed
+22
-14
+22
-14
@@ -2,46 +2,56 @@
|
|||||||
|
|
||||||
- Type: `String`
|
- Type: `String`
|
||||||
|
|
||||||
|
Return the player's version number
|
||||||
|
|
||||||
[Run Code](/Class.version)
|
[Run Code](/Class.version)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
console.log(Artplayer.version);
|
console.info(Artplayer.version);
|
||||||
```
|
```
|
||||||
|
|
||||||
## env
|
## env
|
||||||
|
|
||||||
- Type: `String`
|
- Type: `String`
|
||||||
|
|
||||||
|
Return to the player's code environment: `development` or `production`
|
||||||
|
|
||||||
[Run Code](/Class.env)
|
[Run Code](/Class.env)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
console.log(Artplayer.env);
|
console.info(Artplayer.env);
|
||||||
```
|
```
|
||||||
|
|
||||||
## config
|
## config
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
|
Return all available `propertys`, `methods` and `events` of the `video` element
|
||||||
|
|
||||||
[Run Code](/Class.config)
|
[Run Code](/Class.config)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
console.log(Artplayer.config);
|
console.info(Artplayer.config);
|
||||||
```
|
```
|
||||||
|
|
||||||
## utils
|
## utils
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
|
Return all functional tools for development
|
||||||
|
|
||||||
[Run Code](/Class.utils)
|
[Run Code](/Class.utils)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
console.log(Artplayer.utils);
|
console.info(Object.keys(Artplayer.utils));
|
||||||
```
|
```
|
||||||
|
|
||||||
## option
|
## option
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
|
Return to default player options
|
||||||
|
|
||||||
[Run Code](/Class.option)
|
[Run Code](/Class.option)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -52,6 +62,8 @@ console.log(Artplayer.option);
|
|||||||
|
|
||||||
- Type: `Array`
|
- Type: `Array`
|
||||||
|
|
||||||
|
Return an array of all player instances
|
||||||
|
|
||||||
[Run Code](/Class.instances)
|
[Run Code](/Class.instances)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -62,26 +74,20 @@ console.log(Artplayer.instances.length);
|
|||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
|
Return the scheme used to verify player options
|
||||||
|
|
||||||
[Run Code](/Class.scheme)
|
[Run Code](/Class.scheme)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
console.log(Artplayer.scheme);
|
console.log(Artplayer.scheme);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Emitter
|
|
||||||
|
|
||||||
- Type: `Function`
|
|
||||||
|
|
||||||
[Run Code](/Class.Emitter)
|
|
||||||
|
|
||||||
```js
|
|
||||||
console.log(Artplayer.Emitter);
|
|
||||||
```
|
|
||||||
|
|
||||||
## validator
|
## validator
|
||||||
|
|
||||||
- Type: `Function`
|
- Type: `Function`
|
||||||
|
|
||||||
|
Return validator: [https://github.com/zhw2590582/option-validator](https://github.com/zhw2590582/option-validator)
|
||||||
|
|
||||||
[Run Code](/Class.validator)
|
[Run Code](/Class.validator)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -92,6 +98,8 @@ console.log(Artplayer.validator);
|
|||||||
|
|
||||||
- Type: `Function`
|
- Type: `Function`
|
||||||
|
|
||||||
|
Return type judgment function: [https://github.com/jonschlinkert/kind-of](https://github.com/jonschlinkert/kind-of)
|
||||||
|
|
||||||
[Run Code](/Class.kindOf)
|
[Run Code](/Class.kindOf)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in new issue
Block a user