diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c531e13..4315366 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -32,6 +32,8 @@ export class AppComponent implements AfterViewInit { public qrCodeResult: ScannerQRCodeSelectedFiles[] = []; public qrCodeResult2: ScannerQRCodeSelectedFiles[] = []; + public percentage = 80; + public quality = 100; @ViewChild('action') action: NgxScannerQrcodeComponent; @@ -65,13 +67,13 @@ export class AppComponent implements AfterViewInit { } public onSelects(files: any) { - this.qrcode.loadFiles(files, 30, 30).subscribe((res: ScannerQRCodeSelectedFiles[]) => { + this.qrcode.loadFiles(files, this.percentage, this.quality).subscribe((res: ScannerQRCodeSelectedFiles[]) => { this.qrCodeResult = res; }); } public onSelects2(files: any) { - this.qrcode.loadFilesToScan(files, this.config, 30, 30).subscribe((res: ScannerQRCodeSelectedFiles[]) => { + this.qrcode.loadFilesToScan(files, this.config, this.percentage, this.quality).subscribe((res: ScannerQRCodeSelectedFiles[]) => { console.log(res); this.qrCodeResult2 = res; });