# react-hls

> simple react component for playing hls/rtmp live stream

Latest version **0.0.8** (published 2018-01-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-hls
pnpm add react-hls
yarn add react-hls
bun add react-hls
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2018-01-17 |
| First published | 2017-01-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 44 |
| Author | mingxin.huang |
| Maintainers | mingxin.huang |
| Keywords | hls, rtmp, react |

## Links

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

## Dependencies (1)

- [hls.js](https://npm.io/package/hls.js.md) ^0.6.14

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2018-01-17
- 0.0.7 — 2017-07-10
- 0.0.6 — 2017-05-16
- 0.0.5 — 2017-03-03
- 0.0.4 — 2017-02-28
- 0.0.3 — 2017-02-28
- 0.0.2 — 2017-02-28
- 0.0.1 — 2017-01-15

## README

# react-hls

`react-hls` is a simple hls/rtmp live stream player.
It will use [hls.js](https://github.com/dailymotion/hls.js) to play your hls live stream if your browser support `html 5 video` and `MediaSource Extension`. Otherwise it will downgrade to `Flash` play your `rtmp` live stream.

## Todo
- [x] Start the project
- [x] Write base component structor
- [x] Support Hls live stream playing ability
- [ ] Support Rtmp/Flv live stream
- [ ] downgrad solution
- [ ] bugs & Optimization :)

## Tutorial

```javascript
import ReactHLS from 'react-hls';

// In your render function
<ReactHLS url={"your hls http url"} />
```


## Properties

- url `String` `required`

    the hls url that you want to play

- autoplay `Boolean`

    autoplay when component is ready default to `false`

- constrols `Boolean`

    whether or not showing the playback controls default to `false`

- width `Number`

    video width

- height `Number`

    video height

- hlsConfig `Object`

    `hls.js` config , you can see all config [here](https://github.com/dailymotion/hls.js/blob/master/doc/API.md#fine-tuning)

- videoProps `Object`

    All video tag attributes supported. You can check [all attributes here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video)

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