evgenity / react-html5-video-editor

React / Redux video component with crop. Powers demo video editor at
https://crop-video-online.com
GNU General Public License v3.0
154 stars 29 forks source link

react-html5-video-editor

React / redux video element with a crop marker. Crop markers emit Redux actions when dragged.

npm version Build Status Dependancies

preview

Features:

Do not hesitate to post an issue to request a feature (seriously).

Roadmap

Quickstart

Install

npm init
npm install react-html5-video-editor --save
ls node_modules/react-html5-video-editor/dist/react-html5-video-editor.js # include this in <script>-tag

Basic browser usage

<script type="text/javascript" src="https://github.com/evgenity/react-html5-video-editor/raw/master/js/react-html5-video-editor.js"></script>

<div id="root"></div>
<script type="text/javascript">
    ReactHtml5VideoEditor.render_editor('img/poster.png', 'video/small.mp4')
</script>

React usage

import {RdxVideo, Overlay, Controls} from 'react-html5-video-editor'
ReactDOM.render(
  <RdxVideo autoPlay loop muted poster="src/img/poster.png" store={store}>
    <Overlay />
    <Controls />
    <source src="https://github.com/evgenity/react-html5-video-editor/raw/master/src/video/small.mp4" type="video/mp4" />
  </RdxVideo>
  ,
  document.getElementById('root')
);

Configuration

RdxVideo.Props = {
    autoPlay: false,
    loop: false,
    controls: true,
    volume: 1.0,
    preload: "auto",
    cropEnabled: true;
}

License

Code released under GNU GPLv3