1.0.3 ā¢ Published 4 years ago
webcam-shim v1.0.3
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
- Github: @jaikanthjay46
š License
Copyright Ā© 2020 Jaikanth J. This project is ISC licensed.
This README was generated with ā¤ļø by readme-md-generator