bensonruan / webcam-easy Goto Github PK
View Code? Open in Web Editor NEWjavascript access webcam stream and take photo
Home Page: https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript
License: MIT License
javascript access webcam stream and take photo
Home Page: https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript
License: MIT License
Hi,
I tried to to use the library in Android webview. Despite using 'environment' facing mode it is showing front camera instead of rear. Did someone solve this issue?
Thanks,
Mark
Hello,
thank you - good work! i like it very much!
is it possible to get the picture as a base64 encoded variable, f.e. saving the picture to a database.
Best Regard,
Martin
is it possible to get a camera focus option? the images seem blurred and out of focus
I can't switch to back-facing camera on iOS Safari using this example:
https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript/#webcam-easyjs_demo
Also, none of my implementations are able to address 'environment' setting on iOS Safari inside the constructor.
After the image is captured from the video element and drawn into canvas the width and height of the canvas should have been the same as the video element according to this. But that is not the case.
Hi,
Please help me, how to fix a letters are reversed bug after snap a picture.
Thank you.
I am trying to use the library in Firefox and Microsoft Edge, but it displays an error "MediaStreamError" in Firefox and doesn't work in Microsoft Edge.
Is possible to choose file type? Right now method snap return png img, but I need it as jpg.
Hello,
I use the camera like a popup. But after closing the camera I lost the scrollbar.
There a 2 $('body').css('overflow-y','hidden'); but no restores.
And a $('body').css('overflow-y','visible'); in cameraStopped() or ('#exit-app') dosn,t restore the scrollbar.
But Thanks for the app
the code always streaming video reversed, i tried webcam.flip() or set the 'environment' parameter to webcam but doesn't work:
const webcam = new Webcam(webcamElement, 'environment', canvasElement);
Is it possible to turn on the device flash light?
i followed this link:
https://codepen.io/adamrifai/pen/YLxjKa
and tested it, it turns on the flash light, but the flash light is attached to the camera event.. Is it possible to have this function added?
Greets.
Calling webcam.start with default args of stream = true, the stream call results in two separate prompts to the user to allow access to the webcam in Chrome. Is there a way to request permissions from the user only once for the lifetime of the webcam object? This is the result of the navigator.mediaDevices.getUserMedia(this.getMediaConstraints())
call in both functions. In the stream function the this._streamList
should be checked, and if not empty, simply use the existing stream object.
Hi, today I encounter a CORS issue when using webcam-easy.
I use the CDN <script type="text/javascript" src="https://unpkg.com/webcam-easy/dist/webcam-easy.min.js"></script>
.
It worked great yesterday, but today I got CORS issue.
I was developing on MacBook Pro/iPhone 12 iOS 15.4.1 with the latest Chrome installed.
Thanks.
If I have multiple webcams/video inputs, how do I specify which one to use? Right now, it defaults to the first one found.
Hello, I have a problem when accessing rear cam on android 12.
When I flip to rear cam, it's always blank. Any solutions?
Is there a way to change the aspect ratio of the image? Since I need the image to be 1x1 (480x480px).
Hey, your library is really useful for my project - Thank you so much.
But after the latest chrome update (with the latest Chrome version (90.0.4430.91), the app freezes after clicking the photo in Android, not able to use it. The library was working fine before the update.
Can you please check on it?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.