@rubenchoi/webcam

1.1.1 • Public • Published

React library selecting webcam

NPM JavaScript Style Guide

React library for Webcam Selection. Please see document for further information. This project is created using create-react-library.

Install

npm install --save @rubenchoi/webcam

Usage

import React from 'react'
import { WebcamComponent } from '@rubenchoi/webcam';
import '@rubenchoi/webcam/dist/index.css'

const App = () => {
  const onStream = (stream) => console.log(stream);

  const onMute = (muted) => console.log(muted ? 'muted' : 'unmuted')

  return (
    <div>
      <h2>React App Webcam Test</h2>
      <div style={{ width: '40vw', margin: '1em' }}>
        <WebcamComponent onStream={onStream} onMute={onMute} audioTest={true} />
      </div>
    </div >
  )
}

export default App

License

MIT © rubenchoi

Dependencies (0)

    Dev Dependencies (19)

    Package Sidebar

    Install

    npm i @rubenchoi/webcam

    Weekly Downloads

    0

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    116 kB

    Total Files

    7

    Last publish

    Collaborators

    • rubenchoi