1.0.3 ā€¢ Published 4 years ago

webcam-shim v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

This is for the smooth interim transition of getUserMedia being moved it to mediaDevices. Also gives the old callback style API. This package can be used as standalone and in frameworks such as Angular

Homepage

Usage

npm i webcam-shim
import { getUserMedia } from 'webcam-shim/lib';

...


const constraints: MediaStreamConstraints = { audio: false, video: {  facingMode: 'user' }}
getUserMedia(constraints, 
  (stream) => {
    document.querySelector('#video').video.srcObject = stream;
  },
  (err) => {
      console.log("The following error occurred: " + err);
  }
)

Author

šŸ‘¤ Jaikanth J

šŸ“ License

Copyright Ā© 2020 Jaikanth J. This project is ISC licensed.

This README was generated with ā¤ļø by readme-md-generator

1.0.3

4 years ago

1.0.0

4 years ago