mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
feat(dynamsoft-barcode): update startScanning options (#4205)
* add barcodeBytesBase64 to the BarcodeResult * update startScanning's param to ScanOptions
This commit is contained in:
parent
63c83653c0
commit
4e183b1881
@ -9,6 +9,15 @@ import {
|
||||
} from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* dceLicense: License of Dynamsoft Camera Enhancer
|
||||
* resolution: use EnumResolution
|
||||
*/
|
||||
export interface ScanOptions {
|
||||
dceLicense?: string;
|
||||
resolution?: number;
|
||||
}
|
||||
|
||||
export interface FrameResult {
|
||||
frameWidth: number;
|
||||
frameHeight: number;
|
||||
@ -18,6 +27,7 @@ export interface FrameResult {
|
||||
export interface BarcodeResult {
|
||||
barcodeText: string;
|
||||
barcodeFormat: string;
|
||||
barcodeBytesBase64?: string;
|
||||
x1: number;
|
||||
x2: number;
|
||||
x3: number;
|
||||
@ -28,6 +38,15 @@ export interface BarcodeResult {
|
||||
y4: number;
|
||||
}
|
||||
|
||||
export enum EnumResolution {
|
||||
RESOLUTION_AUTO = 0,
|
||||
RESOLUTION_480P = 1,
|
||||
RESOLUTION_720P = 2,
|
||||
RESOLUTION_1080P = 3,
|
||||
RESOLUTION_2K = 4,
|
||||
RESOLUTION_4K = 5
|
||||
}
|
||||
|
||||
/**
|
||||
* @name dynamsoft-barcode-scanner
|
||||
* @description
|
||||
@ -107,7 +126,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* start the camera to scan barcodes
|
||||
* @param dceLicense {string} License of Dynamsoft Camera Enhancer
|
||||
* @param options {ScanOptions}
|
||||
* @return {Observable<FrameResult>}
|
||||
*/
|
||||
@Cordova({
|
||||
@ -115,7 +134,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
||||
errorIndex: 2,
|
||||
observable: true,
|
||||
})
|
||||
startScanning(dceLicense?: string): Observable<FrameResult> {
|
||||
startScanning(options?: ScanOptions): Observable<FrameResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user