Simple react video container with videojs libaray for displaying apparel videos.
Features
- Mobile friendly
- Native video
- HD switch support
npm install react-video-js
import ProductVideo from 'react-video-js';
class App extends React.Component {
render = () => {
<ProductVideo
ref={i => this.pv = i}
source="https://dl.dropboxusercontent.com/u/8725581/99B170E9-5D1C-49C5-A87F-1123679F3618.MOV"
/>
}
}
source
: (required) String.sourceHD
: String, default''
.poster
: String, defaultnull
.skin
: String, defaultdefault
.bigPlayButton
: Boolean, defaulttrue
.customSkinClass
: String, default''
.height
: Number, defaultnull
.width
: Number, defaultnull
.loop
: Boolean, defaultfalse
.onReady
: Functon,callback(videoJsPlayer)
.resize
: Boolean, defaulttrue
.options
: Boolean, defaultonEnded
: Function,callback(videoJsPlayer)
.onPlay
: Function,callback(videoJsPlayer)
.onPause
: Function,callback(videoJsPlayer)
.debounce
: Number, default300
.
git clone https://github.com/sylvesteraswin/react-video-js
npm install
npm start
MIT
Feel free to contribute and or provide feedback.