https://github.com/andrewjbateman/javascript-webcam
:clipboard: integrate webcam into javascript app, using a server to host the webcam. Manipulate images using image-js
https://github.com/andrewjbateman/javascript-webcam
canvas css html image-js javascript javascript-webcam javascript30 repair tutorial-code
Last synced: 8 months ago
JSON representation
:clipboard: integrate webcam into javascript app, using a server to host the webcam. Manipulate images using image-js
- Host: GitHub
- URL: https://github.com/andrewjbateman/javascript-webcam
- Owner: AndrewJBateman
- Created: 2018-11-19T11:33:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T17:00:28.000Z (over 2 years ago)
- Last Synced: 2024-12-27T02:45:00.150Z (9 months ago)
- Topics: canvas, css, html, image-js, javascript, javascript-webcam, javascript30, repair, tutorial-code
- Language: JavaScript
- Homepage:
- Size: 1.73 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :zap: Javascript Webcam
* 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_


## :page_facing_up: Table of contents
* [:zap: Javascript Webcam](#zap-javascript-webcam)
* [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)
* [:books: General info](#books-general-info)
* [:camera: Screenshots](#camera-screenshots)
* [:signal_strength: Technologies](#signal_strength-technologies)
* [:floppy_disk: Setup](#floppy_disk-setup)
* [:computer: Code Examples](#computer-code-examples)
* [:cool: Features](#cool-features)
* [:clipboard: Status & To-Do List](#clipboard-status--to-do-list)
* [:clap: Inspiration](#clap-inspiration)
* [:file_folder: License](#file_folder-license)
* [:envelope: Contact](#envelope-contact)## :books: General info
* Webcam in javascript app, using a local server to host the webcam.
## :camera: Screenshots
.
.## :signal_strength: Technologies
* Ran in Google Chrome browser with: [Javascript engine V8 Windows (x64)](https://v8.dev/).
* [image-js](https://www.npmjs.com/package/image-js) advanced image processing and manipulation in JavaScript.## :floppy_disk: Setup
* run 'npm i' to install 'browser-sync' package then type 'npm run start'.
## :computer: Code Examples
* function to get video stream data and play it.
```javascript
function getVideo() {
navigator.mediaDevices
.getUserMedia({ video: true, audio: false })
.then(localMediaStream => {
video.srcObject = localMediaStream;
video.play();
})
.catch(err => {
console.error(`oh no!!`, err);
});
}
```## :cool: Features
* 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.## :clipboard: Status & To-Do List
* Status: Working.
* To-Do: add more image filtering functions## :clap: Inspiration
* Wes Bos Youtube Tutorial: [Unreal Webcam Fun with getUserMedia() and HTML5 Canvas - #JavaScript30 19/30](https://www.youtube.com/watch?v=ElWFcBlVk-o&list=PLu8EoSxDXHP6CGK4YVJhL_VWetA865GOH&index=19) but most of the Javascript has been superceded
## :file_folder: License
* N/A
## :envelope: Contact
* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com