@@ -328,7 +328,7 @@ export class MLKitView extends MLKitViewBase {
328328 }
329329 let formats ;
330330 if ( Array . isArray ( value ) ) {
331- if ( value . indexOf ( BarcodeFormats . ALL ) ) {
331+ if ( value . indexOf ( BarcodeFormats . ALL ) !== - 1 ) {
332332 formats = Array . create ( 'io.github.triniwiz.fancycamera.barcodescanning.BarcodeScanner$BarcodeFormat' , 1 ) ;
333333 formats [ 0 ] = io . github . triniwiz . fancycamera . barcodescanning . BarcodeScanner . BarcodeFormat . ALL ;
334334 } else {
@@ -369,7 +369,7 @@ export class MLKitView extends MLKitViewBase {
369369 this . #barcodeScannerOptions. setBarcodeFormat ( formats ) ;
370370 }
371371
372- this . #getFancyCamera ( ) . setBarcodeScannerOptions ( this . #barcodeScannerOptions) ;
372+ this . #camera . setBarcodeScannerOptions ( this . #barcodeScannerOptions) ;
373373 }
374374
375375 [ faceDetectionTrackingEnabledProperty . setNative ] ( value ) {
@@ -382,7 +382,7 @@ export class MLKitView extends MLKitViewBase {
382382
383383 this . #faceDetectionOptions. setFaceTracking ( value ) ;
384384
385- this . #getFancyCamera ( ) . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
385+ this . #camera . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
386386 }
387387
388388 [ faceDetectionMinFaceSizeProperty . setNative ] ( value ) {
@@ -395,7 +395,7 @@ export class MLKitView extends MLKitViewBase {
395395 }
396396
397397 this . #faceDetectionOptions. setMinimumFaceSize ( value ) ;
398- this . #getFancyCamera ( ) . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
398+ this . #camera . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
399399 }
400400
401401 [ faceDetectionPerformanceModeProperty . setNative ] ( value ) {
@@ -408,7 +408,7 @@ export class MLKitView extends MLKitViewBase {
408408 }
409409
410410 this . #faceDetectionOptions. setMinimumFaceSize ( value ) ;
411- this . #getFancyCamera ( ) . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
411+ this . #camera . setFaceDetectionOptions ( this . #faceDetectionOptions) ;
412412 }
413413
414414 [ imageLabelerConfidenceThresholdProperty . setNative ] ( value ) {
@@ -420,7 +420,7 @@ export class MLKitView extends MLKitViewBase {
420420 }
421421
422422 this . #imageLabelerOptions. setConfidenceThreshold ( value ) ;
423- this . #getFancyCamera ( ) . setImageLabelingOptions ( this . #imageLabelerOptions) ;
423+ this . #camera . setImageLabelingOptions ( this . #imageLabelerOptions) ;
424424 }
425425
426426 [ objectDetectionClassifyProperty . setNative ] ( value ) {
@@ -433,7 +433,7 @@ export class MLKitView extends MLKitViewBase {
433433 }
434434
435435 this . #objectDetectionOptions. setClassification ( value ) ;
436- this . #getFancyCamera ( ) . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
436+ this . #camera . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
437437 }
438438
439439 [ objectDetectionMultipleProperty . setNative ] ( value ) {
@@ -446,7 +446,7 @@ export class MLKitView extends MLKitViewBase {
446446 }
447447
448448 this . #objectDetectionOptions. setMultiple ( value ) ;
449- this . #getFancyCamera ( ) . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
449+ this . #camera . setObjectDetectionOptions ( this . #objectDetectionOptions) ;
450450 }
451451
452452
0 commit comments