
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
@regulaforensics/vp-frontend-document-components
Advanced tools
Regula framework agnostic web components to work with webcamera
Document Reader Web Components package contains a number of predefined and configurable components, as described in the table below.
Component | Description |
---|---|
Smart capture ( document-reader ) | Recommended component for most cases, as it is easy to integrate yet flexibly configurable.
|
Snapshot ( camera-snapshot ) |
|
Advanced |
|
getUserMedia
method to display the video stream from the camera—this feature is available only in secure contexts.Devices | ![]() | ![]() | ![]() |
---|---|---|---|
Mobile (iOS) | 99 | 99 | 11 |
Mobile (Android) | 66 | 63 | - |
Desktop | 61 | 63 | 11 |
To support the older browser versions in your project, install the required polyfill packages manually. Follow the link to npm package @webcomponents/webcomponentsjs for installation details.
1. Install the package vp-frontend-document-components:
npm i @regulaforensics/vp-frontend-document-components
2. Import the function defineComponents
and the class DocumentReaderService
into your .js
file:
import { defineComponents, DocumentReaderService } from '@regulaforensics/vp-frontend-document-components';
import { defineComponents, DocumentReaderService } from './node_modules/@regulaforensics/vp-frontend-document-components/dist/main.js';
1. Connect the script to your .html
file. Use a CDN link in the following format: unpkg.com/:package@:version/:file
.
For example:
<script src="https://unpkg.com/@regulaforensics/vp-frontend-document-components@latest/dist/main.iife.js"></script>
2. Import the function defineComponents
and the class DocumentReaderService
into your .js
file:
const { defineComponents, DocumentReaderService } = window.Regula;
1. Add DocumentReaderService
to the global variable RegulaDocumentSDK
and set a processing scenario:
window.RegulaDocumentSDK = new DocumentReaderService();
window.RegulaDocumentSDK.recognizerProcessParam = {
processParam: {
scenario: 'MrzAndLocate',
},
};
window.RegulaDocumentSDK.imageProcessParam = {
processParam: {
scenario: 'MrzAndLocate',
},
};
2. Define the components and initialize the service:
defineComponents().then(() => window.RegulaDocumentSDK.initialize());
defineComponents().then(() => window.RegulaDocumentSDK.initialize({ license: '<BASE64_LICENSE_KEY>' }));
How to convert a license file to the Base64 string
!!! warning Once the development is finished and your product is ready to be exposed to the internet, make sure that you have removed the license from your source code.
3. Add the component tag to the .html
file:
<document-reader></document-reader>
1. Define the components:
defineComponents();
2. Add the component tag to the .html
file:
<camera-snapshot></camera-snapshot>
Regula Document Reader SDK Web Components Documentation
Regula Document Reader SDK Web Components API Reference
There are several project examples that demonstrate the integration way of Regula Document Reader SDK Web Components, visit our repository on GitHub.
Visit the Storybook website to see the live demo.
To submit a request to the Support Team, visit Regula Help Center.
To discuss business opportunities, fill the Enquiry Form and specify your scenarios, applications, and technical requirements.
FAQs
Regula framework agnostic web components to work with webcamera
The npm package @regulaforensics/vp-frontend-document-components receives a total of 1,783 weekly downloads. As such, @regulaforensics/vp-frontend-document-components popularity was classified as popular.
We found that @regulaforensics/vp-frontend-document-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.