This project is a simple camera attendance system using the webcam.js library. This project is made using the HTML, CSS, and JavaScript programming languages.
- WebcamJS v1.0.25
- Clone the repository `git clone
- Run file index.html in your browser
- Allow the browser to access the camera
- Take a photo and the photo will be displayed on the screen
- The photo will be converted to base64 and can be sent to the database
- Adjust the width and height of the camera
Webcam.set({
width: 320,
height: 240,
image_format: 'jpeg',
jpeg_quality: 90
});
- Documentation: WebcamJS
- Capture image from webcam
Webcam.snap(function (data_uri) {
// display results in page
document.getElementById('results').innerHTML =
'<img src="' + data_uri + '"/><input type="text" name="foto" value="' + data_uri + '" required/>';
});
- Input here decodebase 64 will be converted through php to become PNG when sent to the database.
'<img src="' + data_uri + '"/><input type="text" name="foto" value="' + data_uri + '" required/>';
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.