mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +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';
|
} from '@awesome-cordova-plugins/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dceLicense: License of Dynamsoft Camera Enhancer
|
||||||
|
* resolution: use EnumResolution
|
||||||
|
*/
|
||||||
|
export interface ScanOptions {
|
||||||
|
dceLicense?: string;
|
||||||
|
resolution?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface FrameResult {
|
export interface FrameResult {
|
||||||
frameWidth: number;
|
frameWidth: number;
|
||||||
frameHeight: number;
|
frameHeight: number;
|
||||||
@ -18,6 +27,7 @@ export interface FrameResult {
|
|||||||
export interface BarcodeResult {
|
export interface BarcodeResult {
|
||||||
barcodeText: string;
|
barcodeText: string;
|
||||||
barcodeFormat: string;
|
barcodeFormat: string;
|
||||||
|
barcodeBytesBase64?: string;
|
||||||
x1: number;
|
x1: number;
|
||||||
x2: number;
|
x2: number;
|
||||||
x3: number;
|
x3: number;
|
||||||
@ -28,6 +38,15 @@ export interface BarcodeResult {
|
|||||||
y4: number;
|
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
|
* @name dynamsoft-barcode-scanner
|
||||||
* @description
|
* @description
|
||||||
@ -107,7 +126,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* start the camera to scan barcodes
|
* start the camera to scan barcodes
|
||||||
* @param dceLicense {string} License of Dynamsoft Camera Enhancer
|
* @param options {ScanOptions}
|
||||||
* @return {Observable<FrameResult>}
|
* @return {Observable<FrameResult>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -115,7 +134,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
|||||||
errorIndex: 2,
|
errorIndex: 2,
|
||||||
observable: true,
|
observable: true,
|
||||||
})
|
})
|
||||||
startScanning(dceLicense?: string): Observable<FrameResult> {
|
startScanning(options?: ScanOptions): Observable<FrameResult> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user