@privateid/charlie-web-sdk-alpha
Advanced tools
Comparing version 0.0.8-alpha to 0.0.9-alpha
@@ -25,4 +25,5 @@ export declare enum callbakTypeEnum { | ||
returnType?: 'default' | 'all'; | ||
isMobile?: boolean; | ||
} | ||
export declare const createCallback: ({ type, callbackFunction, returnType, imageData, portrait }: createCallbackProps) => (operation: string, id: string, response_str: any) => void; | ||
export declare const createCallback: ({ type, callbackFunction, returnType, imageData, portrait, isMobile }: createCallbackProps) => (operation: string, id: string, response_str: any) => void; | ||
export {}; |
@@ -22,3 +22,3 @@ import { LOGTYPE } from './types'; | ||
})(callbakTypeEnum || (callbakTypeEnum = {})); | ||
export const createCallback = ({ type, callbackFunction, returnType, imageData, portrait }) => { | ||
export const createCallback = ({ type, callbackFunction, returnType, imageData, portrait, isMobile }) => { | ||
const createCallbackIsValid = ({ callback, returnType }) => (operation, id, response_str) => { | ||
@@ -123,3 +123,3 @@ const isResponse = response_str.length > 0; | ||
}; | ||
const createCallbackBackDlScan = ({ callback, returnType }) => (operation, id, response_str) => { | ||
const createCallbackBackDlScan = ({ callback, returnType, isMobile = false }) => (operation, id, response_str) => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; | ||
@@ -139,2 +139,3 @@ const isResponse = response_str.length > 0; | ||
barcode_data: (_o = (_m = returnValue === null || returnValue === void 0 ? void 0 : returnValue.uber_operation_result) === null || _m === void 0 ? void 0 : _m.barcode) === null || _o === void 0 ? void 0 : _o.barcode_data, | ||
is_mobile: isMobile, | ||
}; | ||
@@ -293,3 +294,3 @@ if (operation === 'is_valid_barcode') { | ||
case callbakTypeEnum.backScan: | ||
return createCallbackBackDlScan({ callback: callbackFunction, returnType }); | ||
return createCallbackBackDlScan({ callback: callbackFunction, returnType, isMobile }); | ||
case callbakTypeEnum.documentScanNoFace: | ||
@@ -296,0 +297,0 @@ return createCallbackScanDocumentNoFace({ callback: callbackFunction, returnType }); |
@@ -610,3 +610,3 @@ /* eslint-disable no-loop-func */ | ||
if (['iOS', 'android', 'Android OS'].includes(os)) { | ||
configJSON = Object.assign(Object.assign({}, configJSON), { input_image_format: "rgba", blur_threshold_enroll_pred: 50, threshold_user_too_close: 0.8, threshold_user_too_far: 0.2, threshold_user_up: 0.15, threshold_user_down: 0.9, threshold_user_left: 0.8, threshold_user_right: 0.2, threshold_high_vertical_predict: -0.15, threshold_down_vertical_predict: 0.15 }); | ||
configJSON = Object.assign(Object.assign({}, configJSON), { input_image_format: 'rgba', blur_threshold_enroll_pred: 50, threshold_user_too_close: 0.8, threshold_user_too_far: 0.2, threshold_user_up: 0.15, threshold_user_down: 0.9, threshold_user_left: 0.8, threshold_user_right: 0.2, threshold_high_vertical_predict: -0.15, threshold_down_vertical_predict: 0.15 }); | ||
} | ||
@@ -816,9 +816,11 @@ if (element) { | ||
console.log('before create callback'); | ||
privid_wasm_result = createCallback({ type: callbakTypeEnum.backScan, callbackFunction: callback }); | ||
const { os } = detect(); | ||
if (['iOS', 'android', 'Android OS'].includes(os)) { | ||
configuration = Object.assign(Object.assign({}, configuration), { detect_document_only: true }); | ||
privid_wasm_result = createCallback({ type: callbakTypeEnum.backScan, callbackFunction: callback, isMobile: true }); | ||
} | ||
else { | ||
privid_wasm_result = createCallback({ type: callbakTypeEnum.backScan, callbackFunction: callback }); | ||
} | ||
configuration = JSON.stringify(configuration); | ||
// console.log('here'); | ||
// if (image) { | ||
// const result = await isValidBarCode(image, isSimd, proxy(privid_wasm_result), configuration, debugType); | ||
// return { imageData: image, ...result }; | ||
// } | ||
if (!videoElement || !videoEl) { | ||
@@ -825,0 +827,0 @@ printLogs('capture need the video element id', '', debugType, LOGTYPE.ERROR); |
@@ -5,3 +5,3 @@ { | ||
"description": "CryptoNets WebAssembly SDK", | ||
"version": "0.0.8-alpha", | ||
"version": "0.0.9-alpha", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "Face recognition", |
{ | ||
"version": "24.12.27-59b7ae8" | ||
"version": "25.01.21-5e36a28" | ||
} |
{ | ||
"version": "24.12.27-59b7ae8" | ||
"version": "25.01.21-5e36a28" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
19588583
5392