- Javascript control of PC webcam with functions to manipulate image colours etc.
- Note: to open web links in a new window use: ctrl+click on link
- Webcam in javascript app, using a local server to host the webcam.
- Ran in Google Chrome browser with: Javascript engine V8 Windows (x64).
- image-js advanced image processing and manipulation in JavaScript.
- run 'npm i' to install 'browser-sync' package then type 'npm run start'.
- function to get video stream data and play it.
function getVideo() {
navigator.mediaDevices
.getUserMedia({ video: true, audio: false })
.then(localMediaStream => {
video.srcObject = localMediaStream;
video.play();
})
.catch(err => {
console.error(`oh no!!`, err);
});
}
- Updated as video.src is deprecated in Chrome Browser: video.srcObject is the new version.
- npm module image-js can manipulate images to change colours etc.
- Status: Working.
- To-Do: add more image filtering functions
- Wes Bos Youtube Tutorial: Unreal Webcam Fun with getUserMedia() and HTML5 Canvas - #JavaScript30 19/30 but most of the Javascript has been superceded
- N/A
- Repo created by ABateman, email: gomezbateman@yahoo.com