Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ngx-zxing-multicode
Advanced tools
Readme
A 1D and 2D barcode scanner using HTML5 video element, built using the ZXing library. This module is really usable since it solves some commen problems with @zxing/ngx-scanner
- see Features.
Run
npm i -s ngx-zxing-multicode
to install this package. Then include the module in your project's main module, e.g. the AppModule
:
@NgModule({
...
imports: [
...
NgxZxingMulticodeModule
],
...
})
export class AppModule { }
and use it in any place:
<ngx-zxing-multicode></ngx-zxing-multicode>
<ngx-zxing-multicode
[detectInterval]="100"
[persistence]="20"
[hideDeviceSelector]="true"
[previewFitMode]="fill
(detect)="myFunc($event)"
(error)="myFunc($event)"
(notFound)="myFunc()"
></ngx-zxing-multicode>
detectInterval
- interval in ms to run the recognitionpersistence
- the time during which the same barcode is not emitted multiple times, calculated: detectInterval * persistence
hideDeviceSelector
- if the device selection dropdown is shown or not (always the first device is started)previewFitMode
- by default cover
, determines how the video fits the element. See https://developer.mozilla.org/de/docs/Web/CSS/object-fitdetect
- called when a barcode is found with ScanResult
as payloaderror
- called if any error occurred with NgxZxingMulticodeError
notFound
- called on every interval cycle if no barcode is foundEvent objects details:
export interface ScanResult {
type: string; // Type of the barcode found
code: string; // Barcode payload
raw: ZXing.Result; // Original object
}
export enum NgxZxingMulticodeErrno {
E_MEDIA_ACCESS = 1,
E_NO_DEVICES = 2,
E_NO_SUPPORT = 3,
E_LIST_DEVICES = 4,
E_SCAN = 5
}
export interface NgxZxingMulticodeError {
code: NgxZxingMulticodeErrno;
error?: Error; // Original error
}
This module has been written quickly since @zxing/ngx-scanner
is really nice but has some serious limitations when used in a real-world scenario:
*ngIf
) it properly stops all camera access and recognition and releases the resourcesconsole.{log|error}
output which is a no-go for a production app. This library uses the debug
module for logging which is turned of and can be turned onThe are a lot of extensions which could be applied to this module, namely:
localStorage
for next useFAQs
A 1D and 2D barcode scanner using HTML5 video element, built using the ZXing library which is really usable
The npm package ngx-zxing-multicode receives a total of 3 weekly downloads. As such, ngx-zxing-multicode popularity was classified as not popular.
We found that ngx-zxing-multicode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.