mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
添加react组件
This commit is contained in:
1 parent
f13aebd720
commit
e00fab0bfe
6 files changed
+129
No files matched your search
@@ -0,0 +1,42 @@
|
||||
# artplayer-react
|
||||
|
||||
Artplayer React Component, It is recommended to package itself according to actual business needs.
|
||||
|
||||
## Demo
|
||||
|
||||
[Checkout the demo](https://artplayer.org/react/) from Github Pages
|
||||
|
||||
## Install
|
||||
|
||||
Install with `npm`
|
||||
|
||||
```
|
||||
$ npm install artplayer-react
|
||||
```
|
||||
|
||||
Or install with `yarn`
|
||||
|
||||
```
|
||||
$ yarn add artplayer-react
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import Artplayer from 'artplayer-react';
|
||||
import 'artplayer/dist/artplayer.css';
|
||||
|
||||
// ...
|
||||
<Artplayer
|
||||
option={
|
||||
{
|
||||
// option, no 'container' property required
|
||||
}
|
||||
}
|
||||
getInstance={ins => console.log(ins)} // get the instance
|
||||
/>;
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Harvey Zack](https://www.zhw-island.com/)
|
||||
Reference in new issue
Block a user