mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -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`
|
||||
|
||||
Return the player's version number
|
||||
|
||||
[Run Code](/Class.version)
|
||||
|
||||
```js
|
||||
console.log(Artplayer.version);
|
||||
console.info(Artplayer.version);
|
||||
```
|
||||
|
||||
## env
|
||||
|
||||
- Type: `String`
|
||||
|
||||
Return to the player's code environment: `development` or `production`
|
||||
|
||||
[Run Code](/Class.env)
|
||||
|
||||
```js
|
||||
console.log(Artplayer.env);
|
||||
console.info(Artplayer.env);
|
||||
```
|
||||
|
||||
## config
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
Return all available `propertys`, `methods` and `events` of the `video` element
|
||||
|
||||
[Run Code](/Class.config)
|
||||
|
||||
```js
|
||||
console.log(Artplayer.config);
|
||||
console.info(Artplayer.config);
|
||||
```
|
||||
|
||||
## utils
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
Return all functional tools for development
|
||||
|
||||
[Run Code](/Class.utils)
|
||||
|
||||
```js
|
||||
console.log(Artplayer.utils);
|
||||
console.info(Object.keys(Artplayer.utils));
|
||||
```
|
||||
|
||||
## option
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
Return to default player options
|
||||
|
||||
[Run Code](/Class.option)
|
||||
|
||||
```js
|
||||
@@ -52,6 +62,8 @@ console.log(Artplayer.option);
|
||||
|
||||
- Type: `Array`
|
||||
|
||||
Return an array of all player instances
|
||||
|
||||
[Run Code](/Class.instances)
|
||||
|
||||
```js
|
||||
@@ -62,26 +74,20 @@ console.log(Artplayer.instances.length);
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
Return the scheme used to verify player options
|
||||
|
||||
[Run Code](/Class.scheme)
|
||||
|
||||
```js
|
||||
console.log(Artplayer.scheme);
|
||||
```
|
||||
|
||||
## Emitter
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
[Run Code](/Class.Emitter)
|
||||
|
||||
```js
|
||||
console.log(Artplayer.Emitter);
|
||||
```
|
||||
|
||||
## validator
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
Return validator: [https://github.com/zhw2590582/option-validator](https://github.com/zhw2590582/option-validator)
|
||||
|
||||
[Run Code](/Class.validator)
|
||||
|
||||
```js
|
||||
@@ -92,6 +98,8 @@ console.log(Artplayer.validator);
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
Return type judgment function: [https://github.com/jonschlinkert/kind-of](https://github.com/jonschlinkert/kind-of)
|
||||
|
||||
[Run Code](/Class.kindOf)
|
||||
|
||||
```js
|
||||
|
||||
Reference in new issue
Block a user