@@ -14,12 +14,12 @@ const DetectorType_Pose = lazy(() => io.github.triniwiz.fancycamera.DetectorType
1414const DetectorType_Text = lazy ( ( ) => io . github . triniwiz . fancycamera . DetectorType . Text ) ;
1515const DetectorType_Selfie = lazy ( ( ) => ( io as any ) . github . triniwiz . fancycamera . DetectorType . Selfie ) ;
1616
17- const BARCODE_SCANNER_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. barcodescanning ?. BarcodeScanner ) ;
18- const TEXT_RECOGNITION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. textrecognition ?. TextRecognition ) ;
19- const FACE_DETECTION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. facedetection ?. FaceDetection ) ;
20- const IMAGE_LABELING_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. imagelabeling ?. ImageLabeling ) ;
21- const OBJECT_DETECTION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. objectdetection ?. ObjectDetection ) ;
22- const POSE_DETECTION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. posedetection ?. PoseDetection ) ;
17+ const BARCODE_SCANNER_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. barcodescanning ?. BarcodeScanner !== 'undefined' ) ;
18+ const TEXT_RECOGNITION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. textrecognition ?. TextRecognition !== 'undefined' ) ;
19+ const FACE_DETECTION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. facedetection ?. FaceDetection !== 'undefined' ) ;
20+ const IMAGE_LABELING_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. imagelabeling ?. ImageLabeling !== 'undefined' ) ;
21+ const OBJECT_DETECTION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. objectdetection ?. ObjectDetection !== 'undefined' ) ;
22+ const POSE_DETECTION_SUPPORTED = lazy ( ( ) => typeof io . github . triniwiz . fancycamera ?. posedetection ?. PoseDetection !== 'undefined' ) ;
2323
2424const TORCH_MODE_ON = lazy ( ( ) => io . github . triniwiz . fancycamera . CameraFlashMode . TORCH ) ;
2525const TORCH_MODE_OFF = lazy ( ( ) => io . github . triniwiz . fancycamera . CameraFlashMode . OFF ) ;
@@ -392,7 +392,7 @@ export class MLKitView extends MLKitViewBase {
392392 }
393393
394394 [ faceDetectionTrackingEnabledProperty . setNative ] ( value ) {
395- if ( ! FACE_DETECTION_SUPPORTED ) {
395+ if ( ! FACE_DETECTION_SUPPORTED ( ) ) {
396396 return ;
397397 }
398398 if ( ! this . #faceDetectionOptions) {
@@ -405,7 +405,7 @@ export class MLKitView extends MLKitViewBase {
405405 }
406406
407407 [ faceDetectionMinFaceSizeProperty . setNative ] ( value ) {
408- if ( ! FACE_DETECTION_SUPPORTED ) {
408+ if ( ! FACE_DETECTION_SUPPORTED ( ) ) {
409409 return ;
410410 }
411411
@@ -418,7 +418,7 @@ export class MLKitView extends MLKitViewBase {
418418 }
419419
420420 [ faceDetectionPerformanceModeProperty . setNative ] ( value ) {
421- if ( ! FACE_DETECTION_SUPPORTED ) {
421+ if ( ! FACE_DETECTION_SUPPORTED ( ) ) {
422422 return ;
423423 }
424424
@@ -456,7 +456,7 @@ export class MLKitView extends MLKitViewBase {
456456 }
457457
458458 [ objectDetectionMultipleProperty . setNative ] ( value ) {
459- if ( ! OBJECT_DETECTION_SUPPORTED ) {
459+ if ( ! OBJECT_DETECTION_SUPPORTED ( ) ) {
460460 return ;
461461 }
462462
0 commit comments