@@ -14,12 +14,12 @@ const DetectorType_Pose = lazy(() => io.github.triniwiz.fancycamera.DetectorType
14
14
const DetectorType_Text = lazy ( ( ) => io . github . triniwiz . fancycamera . DetectorType . Text ) ;
15
15
const DetectorType_Selfie = lazy ( ( ) => ( io as any ) . github . triniwiz . fancycamera . DetectorType . Selfie ) ;
16
16
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' ) ;
23
23
24
24
const TORCH_MODE_ON = lazy ( ( ) => io . github . triniwiz . fancycamera . CameraFlashMode . TORCH ) ;
25
25
const TORCH_MODE_OFF = lazy ( ( ) => io . github . triniwiz . fancycamera . CameraFlashMode . OFF ) ;
@@ -392,7 +392,7 @@ export class MLKitView extends MLKitViewBase {
392
392
}
393
393
394
394
[ faceDetectionTrackingEnabledProperty . setNative ] ( value ) {
395
- if ( ! FACE_DETECTION_SUPPORTED ) {
395
+ if ( ! FACE_DETECTION_SUPPORTED ( ) ) {
396
396
return ;
397
397
}
398
398
if ( ! this . #faceDetectionOptions) {
@@ -405,7 +405,7 @@ export class MLKitView extends MLKitViewBase {
405
405
}
406
406
407
407
[ faceDetectionMinFaceSizeProperty . setNative ] ( value ) {
408
- if ( ! FACE_DETECTION_SUPPORTED ) {
408
+ if ( ! FACE_DETECTION_SUPPORTED ( ) ) {
409
409
return ;
410
410
}
411
411
@@ -418,7 +418,7 @@ export class MLKitView extends MLKitViewBase {
418
418
}
419
419
420
420
[ faceDetectionPerformanceModeProperty . setNative ] ( value ) {
421
- if ( ! FACE_DETECTION_SUPPORTED ) {
421
+ if ( ! FACE_DETECTION_SUPPORTED ( ) ) {
422
422
return ;
423
423
}
424
424
@@ -456,7 +456,7 @@ export class MLKitView extends MLKitViewBase {
456
456
}
457
457
458
458
[ objectDetectionMultipleProperty . setNative ] ( value ) {
459
- if ( ! OBJECT_DETECTION_SUPPORTED ) {
459
+ if ( ! OBJECT_DETECTION_SUPPORTED ( ) ) {
460
460
return ;
461
461
}
462
462
0 commit comments