Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/naimikan/react-trailer

VideoPlayer component for React :movie_camera:
https://github.com/naimikan/react-trailer

html5 html5-video react styled-components video video-player

Last synced: 28 days ago
JSON representation

VideoPlayer component for React :movie_camera:

Awesome Lists containing this project

README

        

react-trailer | Wiki

Video player for React.

Installation

NPM
```shell
npm i react-trailer --save
```

Get Started

Import the components needed to build your video player:
```javascript
import {
VideoPlayer,
Viewer,
Controls,
PlayButton,
FullscreenButton,
ProgressControl,
DurationControl,
} from 'react-trailer';
```

Usage

```jsx







{({ isPlaying }) => (isPlaying ? 'Pause' : 'Play')}


{({ isFullscreen }) => (isFullscreen ? 'Close' : 'Fullscreen')}


```

Developing

Install dependencies, build the source files and preview

```shell
git clone https://github.com/Naimikan/react-trailer.git
npm install
npm run build && npm start
```