# online-react-dplayer

> online react player

Latest version **1.5.1** (published 2020-02-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install online-react-dplayer
pnpm add online-react-dplayer
yarn add online-react-dplayer
bun add online-react-dplayer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2020-02-20 |
| First published | 2020-02-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 149 |
| Author | hnsylitao@gmail.com |
| Maintainers | xincmm |
| Keywords | dplayer, react-dplayer |

## Links

- npm: https://www.npmjs.com/package/online-react-dplayer
- Repository: https://github.com/hnsylitao/react-dplayer
- Homepage: https://github.com/hnsylitao/react-dplayer#readme
- Issues: https://github.com/hnsylitao/react-dplayer/issues
- npm.io page: https://npm.io/package/online-react-dplayer

## Dependencies (4)

- [omit.js](https://npm.io/package/omit.js.md) ^1.0.2
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2
- [mars-dplayer](https://npm.io/package/mars-dplayer.md) 2.0.1

## Recent versions

- 1.5.1 (latest) — 2020-02-20
- 1.5.0 — 2020-02-20
- 1.4.0 — 2020-02-19
- 1.3.0 — 2020-02-19
- 1.2.0 — 2020-02-19
- 1.1.0 — 2020-02-13
- 1.0.0 — 2020-02-13
- 0.3.3 — 2020-02-13

## README

[![Build Status](https://travis-ci.org/MoePlayer/react-dplayer.svg?branch=master)](https://travis-ci.org/MoePlayer/react-dplayer)
[![Version](https://img.shields.io/npm/v/react-dplayer.svg?style=flat)](https://www.npmjs.com/package/react-dplayer)
[![NPM](https://img.shields.io/npm/dt/react-dplayer.svg?style=flat)](https://www.npmjs.com/package/react-dplayer)
[![LICENSE](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/hnsylitao/react-dplayer/blob/master/LICENSE)

# react-dplayer [demo](https://codesandbox.io/s/1rkx7lyrml)

# Gitpod

Open the project in Gitpod (free online dev environment for GitHub) and start coding immediately.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/MoePlayer/react-dplayer)


**React component for Dplayer** based on [DPlayer(V1.25.0)](https://github.com/DIYgod/DPlayer).

## Install

```bash
npm install react-dplayer -D
```

## Usage

### commonjs
```js
import DPlayer from "react-dplayer";

class Example extends Component {
    render() {
        return (
            <DPlayer
                options={{
                    video:{url: 'http://static.smartisanos.cn/common/video/t1-ui.mp4'}
                }}
                />
        )
    }
}
```

### browser
```html
<link rel="stylesheet" href="https://unpkg.com/dplayer/dist/DPlayer.min.css">
<script src="https://unpkg.com/dplayer/dist/DPlayer.min.js" />
<script src="https://unpkg.com/react/dist/react.min.js" />
<script src="https://unpkg.com/react-dom/dist/react-dom.min.js" />
<script src="https://unpkg.com/react-dplayer/dist/react-dplayer.min.js" />
<div id="example"></div>
<script >
	ReactDOM.render(React.createElement(
	  'div',
	  { style: { width: 800, margin: '0px auto' } },
	  React.createElement(ReactDPlayer, {options:{video: {url: 'http://static.smartisanos.cn/common/video/t1-ui.mp4'} }})
	), document.getElementById('example'));
</script>
```

The package also includes an in-built example under the `/example` folder. Run the sample application by cloning project and running npm start.

## [Dplayer Doc](http://dplayer.js.org/docs/)

## Props

| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| options | Object | -- | [read doc](http://dplayer.js.org/guide.html#options) |

## Events

> `camel-case rule` example play as onPlay

| Name | Params | Description |
| ---- | ------ | ----------- |
| allEvent | default | [read doc](http://dplayer.js.org/guide.html#event-binding)  |

## Development

- `npm run start`: Run example in development mode
- `npm run compile`: Build react-dplayer（commonjs）
- `npm run dist`: dist react-dplayer (umd)

## License

`react-dplayer` is released under the `MIT license`.

---
_Source: https://npm.io/package/online-react-dplayer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
