1.0.13 • Published 7 years ago

react-video-preview v1.0.13

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Installation

NPM

npm install react-video-preview

Usage

Without jsx

ReactDOM.render(
  React.createElement(VideoPreview.VideoPreview, { videoId: 'webcam-preview', audio: true, width: 500, height: 500}, null),
  document.getElementById('root'));

With jsx

ReactDOM.render(
  <VideoPreview videoId="webcam-preview" audio={true} width={500} height={500} />,
  document.getElementById('root')
);

HOC

You can use HOC Preview to compose with another component and customize entire video/audio preview.

This is our default video component:

export const Video = props => (
  <video
    id="webcam-preview"
    className={props.className || "video"}
    height={props.height}
    width={props.width}
    autoPlay>
  </video>
);

// here our hoc Preview receiving default Video
// you can use your custom video component instead
export const VideoPreview = Preview(Video);
1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago