Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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:
- Host: GitHub
- URL: https://github.com/naimikan/react-trailer
- Owner: Naimikan
- License: mit
- Created: 2019-10-19T17:34:22.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T23:04:52.000Z (almost 2 years ago)
- Last Synced: 2024-08-09T19:21:33.326Z (3 months ago)
- Topics: html5, html5-video, react, styled-components, video, video-player
- Language: JavaScript
- Homepage: https://react-trailer.netlify.app/
- Size: 4.56 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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
```