mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
43 lines
710 B
Markdown
43 lines
710 B
Markdown
# artplayer-react
|
|
|
|
React Component for Artplayer, It is recommended to package itself according to actual business needs.
|
|
|
|
## Demo
|
|
|
|
[Checkout the demo](https://codesandbox.io/s/n74859y9rl) from Codesandbox
|
|
|
|
## Install
|
|
|
|
Install with `npm`
|
|
|
|
```bash
|
|
$ npm install artplayer-react
|
|
```
|
|
|
|
Or install with `yarn`
|
|
|
|
```bash
|
|
$ yarn add artplayer-react
|
|
```
|
|
|
|
## Usage
|
|
|
|
```js
|
|
import ArtplayerComponent from 'artplayer-react';
|
|
import 'artplayer-react/dist/artplayer-react.css';
|
|
|
|
// ...
|
|
<ArtplayerComponent
|
|
option={
|
|
{
|
|
// option, no 'container' property required
|
|
}
|
|
}
|
|
getInstance={ins => console.log(ins)} // get the instance
|
|
/>;
|
|
```
|
|
|
|
## License
|
|
|
|
MIT © [Harvey Zack](https://sleepy.im/)
|