@@ -328,7 +328,7 @@ export class MLKitView extends MLKitViewBase {
328
328
}
329
329
let formats ;
330
330
if ( Array . isArray ( value ) ) {
331
- if ( value . indexOf ( BarcodeFormats . ALL ) ) {
331
+ if ( value . indexOf ( BarcodeFormats . ALL ) !== - 1 ) {
332
332
formats = Array . create ( 'io.github.triniwiz.fancycamera.barcodescanning.BarcodeScanner$BarcodeFormat' , 1 ) ;
333
333
formats [ 0 ] = io . github . triniwiz . fancycamera . barcodescanning . BarcodeScanner . BarcodeFormat . ALL ;
334
334
} else {
@@ -369,7 +369,7 @@ export class MLKitView extends MLKitViewBase {
369
369
this . #barcodeScannerOptions. setBarcodeFormat ( formats ) ;
370
370
}
371
371
372
- this . #getFancyCamera ( ) . setBarcodeScannerOptions ( this . #barcodeScannerOptions) ;
372
+ this . #camera . setBarcodeScannerOptions ( this . #barcodeScannerOptions) ;
373
373
}
374
374
375
375
[ faceDetectionTrackingEnabledProperty . setNative ] ( value ) {
@@ -382,7 +382,7 @@ export class MLKitView extends MLKitViewBase {
382
382
383
383
this . #faceDetectionOptions. setFaceTracking ( value ) ;
384
384
385
- this . #getFancyCamera ( ) . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
385
+ this . #camera . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
386
386
}
387
387
388
388
[ faceDetectionMinFaceSizeProperty . setNative ] ( value ) {
@@ -395,7 +395,7 @@ export class MLKitView extends MLKitViewBase {
395
395
}
396
396
397
397
this . #faceDetectionOptions. setMinimumFaceSize ( value ) ;
398
- this . #getFancyCamera ( ) . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
398
+ this . #camera . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
399
399
}
400
400
401
401
[ faceDetectionPerformanceModeProperty . setNative ] ( value ) {
@@ -408,7 +408,7 @@ export class MLKitView extends MLKitViewBase {
408
408
}
409
409
410
410
this . #faceDetectionOptions. setMinimumFaceSize ( value ) ;
411
- this . #getFancyCamera ( ) . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
411
+ this . #camera . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
412
412
}
413
413
414
414
[ imageLabelerConfidenceThresholdProperty . setNative ] ( value ) {
@@ -420,7 +420,7 @@ export class MLKitView extends MLKitViewBase {
420
420
}
421
421
422
422
this . #imageLabelerOptions. setConfidenceThreshold ( value ) ;
423
- this . #getFancyCamera ( ) . setImageLabelingOptions ( this . #imageLabelerOptions) ;
423
+ this . #camera . setImageLabelingOptions ( this . #imageLabelerOptions) ;
424
424
}
425
425
426
426
[ objectDetectionClassifyProperty . setNative ] ( value ) {
@@ -433,7 +433,7 @@ export class MLKitView extends MLKitViewBase {
433
433
}
434
434
435
435
this . #objectDetectionOptions. setClassification ( value ) ;
436
- this . #getFancyCamera ( ) . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
436
+ this . #camera . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
437
437
}
438
438
439
439
[ objectDetectionMultipleProperty . setNative ] ( value ) {
@@ -446,7 +446,7 @@ export class MLKitView extends MLKitViewBase {
446
446
}
447
447
448
448
this . #objectDetectionOptions. setMultiple ( value ) ;
449
- this . #getFancyCamera ( ) . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
449
+ this . #camera . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
450
450
}
451
451
452
452
0 commit comments