We have created a web application that is opened in mobile app’s WebView and capturing images using MediaStream APIs.
Could someone please suggest any npm packages or existing APIs that we can utilize for auto detect and capture of document (any valid official or other document).
NOTE: we have opened camera and capturing images using MediaStream APIs
Reference on implementation part: https://flaviocopes.com/getusermedia/
You can simply use HTML5 with these tags:
<input type="file" name="image" accept="image/*" capture="environment">
and to access the environment-facing (rear) camera:
<input type="file" name="image" accept="image/*" capture="user">
1