react-light-video

1.1.0 • Public • Published

react-light-video

react-light-video is a web video player using React library.

Installation

npm install --save react-light-video

import react-light-video in your project:

import Player from 'react-light-video';
 
export default props => {
  const props = {
    source: 'your video href here',
    controls: true,
    loop: true
  };
  return <Player {...props} />;
};

Options

  • source : Video Link
  • fluid (default: true) : if video player 100% width of its father container
  • aspectRatio (default: '16:9'): videoWidth : videoHeight
  • width(number): ignore when fluid is true
  • height(number): ignore when fluid is true
  • loop (default: false)
  • controls (default: true)
  • autoPlay (default: false)
  • playsInline (default: false)

Events

  • onPlay
  • onPlaying
  • onEnded
  • onPause
  • onTimeUpdate
  • onAbort
  • onRef
  • onLoadStart
  • onWaiting
  • onCanPlay
  • onCanPlayThrough
  • onSeeking
  • onSeeked
  • onProgress
  • onDurationChange
  • onError
  • onSuspend
  • onEmptied
  • onStalled
  • onLoadedMetadata
  • onLoadedData
  • onRateChange
  • onVolumeChange
  • onAutoPlay

Readme

Keywords

Package Sidebar

Install

npm i react-light-video

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

24.9 kB

Total Files

17

Last publish

Collaborators

  • litou.cjs