react-trailer
react-trailer is a wrapper around HTML5 video API that allows you to render videos in your React application.
Installation
First of all, install the following peer dependencies:
npm i react prop-types styled-components
To add the library to your project you can either use a CDN service:
<script src="https://unpkg.com/react-trailer@1.2.2/index.js"></script>
Or npm to install the library from npm registry:
npm i --save react-trailer
Or if you prefer yarn:
yarn add react-trailer
Demo
Usage
import { VideoPlayer, Viewer } from 'react-trailer';<VideoPlayer><Viewerurl="http://dl5.webmfiles.org/big-buck-bunny_trailer.webm"nativeControls/></VideoPlayer>
Development
npm i && npm start