Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-video-preview

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-video-preview

Little video preview using webRTC

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by333.33%
Maintainers
1
Weekly downloads
 
Created
Source

react video preview

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);

Keywords

FAQs

Package last updated on 13 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc