Answer the question
In order to leave comments, you need to log in
Is it possible to access native camera dialog from javascript?
The title may not be obvious, so I'll try to explain in more detail.
I am writing a browser-based adaptive web application that should take a photo from the camera, show it to the user and upload it to the server. In general, there are no questions about how to do this. This tutorial is very good: https://developer.mozilla.org/en-US/docs/Web/API/W...
It is
quite convenient to take pictures from a webcam. But on mobile, it's terrible.
The problem is that:
1. On my Galaxy S5 (not the oldest mobile phone), the image (from the tutorial example) is terribly buggy.
2. It is completely incomprehensible how to change the front camera to the rear one (and this is a must).
My question is: is it possible to somehow call the standard camera dialog so that the user can flip the cameras, zoom and other standard settings, and after the photo is taken, return to the web application with the data of the photo taken?
Answer the question
In order to leave comments, you need to log in
He asked and answered himself. It's done like this:
On phones (at least Android), the interface asks if you want to take a photo or choose from a gallery.
Thanks to l-liava-l from javascript.ru
javascript.ru/forum/offtopic/56536-est-li-vozmozhn...
The camera does not have any native dialog.
But if you follow one of the links in the article where you got the code from, you can get here: https://developer.mozilla.org/en-US/docs/Web/API/M...
and read an example there, beginning with words
Support for this in browsers is another, separate issue, and everything is sad there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question