Video-React

The web video player built from the ground up for an HTML5 world using React library.

View on GithubView Components

Installation


NPM

Install video-react and peer dependencies via NPM

npm install --save video-react react react-dom redux

Basic example

The basic player

Current Time 0:00
/
Duration Time 0:00
Progress: NaN%

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"
    />
  );
};

Development


Install dependencies:

npm install

Run examples at http://localhost:9000/ with webpack dev server:

npm start

Run tests & coverage report:

npm test