The web video player built from the ground up for an HTML5 world using React library.
Install video-react and peer dependencies via NPM
npm install --save video-react react react-dom redux
The basic player
import css in your app or add video-react styles in your page
import "node_modules/video-react/dist/video-react.css"; // import css
@import "~video-react/styles/scss/video-react"; // or import scss
<link rel="stylesheet" href="/css/video-react.css" />
import React from 'react';
import { Player } from 'video-react';
export default props => {
return (
<Player
playsInline
poster="/assets/poster.png"
src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4"
/>
);
};
Install dependencies:
npm install
Run examples at http://localhost:9000/ with webpack dev server:
npm start
Run tests & coverage report:
npm test