gbc-kyc-kit 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gbc-kyc-kit.es.js +33 -21
- package/dist/gbc-kyc-kit.umd.js +46 -46
- package/package.json +1 -1
package/dist/gbc-kyc-kit.es.js
CHANGED
|
@@ -39128,6 +39128,7 @@ function UploadDocument2({
|
|
|
39128
39128
|
streamRef,
|
|
39129
39129
|
onTapToFocus
|
|
39130
39130
|
}) {
|
|
39131
|
+
console.log(videoConstraints);
|
|
39131
39132
|
useEffect(() => {
|
|
39132
39133
|
if (activateCamera && videoRef.current) {
|
|
39133
39134
|
navigator.mediaDevices.getUserMedia({
|
|
@@ -39281,37 +39282,46 @@ function SideDocsSelector({
|
|
|
39281
39282
|
onUploadImage2(side, imageData);
|
|
39282
39283
|
};
|
|
39283
39284
|
const handleTapToFocus = async () => {
|
|
39284
|
-
var _a;
|
|
39285
|
+
var _a, _b;
|
|
39285
39286
|
if (!streamRef.current)
|
|
39286
39287
|
return;
|
|
39287
39288
|
const [track] = streamRef.current.getVideoTracks();
|
|
39288
|
-
const capabilities = track.getCapabilities();
|
|
39289
|
-
track.getSettings();
|
|
39290
|
-
|
|
39291
|
-
|
|
39289
|
+
const capabilities = (_a = track.getCapabilities) == null ? void 0 : _a.call(track);
|
|
39290
|
+
const settings = (_b = track.getSettings) == null ? void 0 : _b.call(track);
|
|
39291
|
+
console.log("focus capabilities:", capabilities);
|
|
39292
|
+
console.log("focus settings:", settings);
|
|
39293
|
+
if (!capabilities || !capabilities.focusMode) {
|
|
39294
|
+
console.warn("No se puede acceder a las capacidades de enfoque");
|
|
39295
|
+
return;
|
|
39296
|
+
}
|
|
39297
|
+
try {
|
|
39298
|
+
if (capabilities.focusMode.includes("continuous")) {
|
|
39292
39299
|
await track.applyConstraints({
|
|
39293
39300
|
advanced: [{
|
|
39294
|
-
focusMode: "
|
|
39295
|
-
focusDistance: (_a = capabilities.focusDistance) == null ? void 0 : _a.min
|
|
39301
|
+
focusMode: "continuous"
|
|
39296
39302
|
}]
|
|
39297
39303
|
});
|
|
39298
|
-
console.log("
|
|
39299
|
-
}
|
|
39300
|
-
console.error("Error al aplicar enfoque manual:", err);
|
|
39301
|
-
}
|
|
39302
|
-
} else if (capabilities.focusMode && capabilities.focusMode.includes("continuous")) {
|
|
39303
|
-
try {
|
|
39304
|
+
console.log("Reiniciado enfoque autom\xE1tico (continuous)");
|
|
39305
|
+
} else if (capabilities.focusMode.includes("single-shot")) {
|
|
39304
39306
|
await track.applyConstraints({
|
|
39305
39307
|
advanced: [{
|
|
39306
|
-
focusMode: "
|
|
39308
|
+
focusMode: "single-shot"
|
|
39307
39309
|
}]
|
|
39308
39310
|
});
|
|
39309
|
-
console.log("
|
|
39310
|
-
}
|
|
39311
|
-
|
|
39311
|
+
console.log("Aplicado enfoque tipo single-shot");
|
|
39312
|
+
} else if (capabilities.focusMode.includes("manual") && capabilities.focusDistance) {
|
|
39313
|
+
await track.applyConstraints({
|
|
39314
|
+
advanced: [{
|
|
39315
|
+
focusMode: "manual",
|
|
39316
|
+
focusDistance: capabilities.focusDistance.min
|
|
39317
|
+
}]
|
|
39318
|
+
});
|
|
39319
|
+
console.log("Aplicado enfoque manual al m\xEDnimo");
|
|
39320
|
+
} else {
|
|
39321
|
+
console.warn("No hay modo de enfoque compatible");
|
|
39312
39322
|
}
|
|
39313
|
-
}
|
|
39314
|
-
console.
|
|
39323
|
+
} catch (err) {
|
|
39324
|
+
console.error("Error al aplicar constraints de enfoque:", err);
|
|
39315
39325
|
}
|
|
39316
39326
|
};
|
|
39317
39327
|
return /* @__PURE__ */ jsxs(Box$1, {
|
|
@@ -39362,7 +39372,8 @@ function SideDocsSelector({
|
|
|
39362
39372
|
alt: "thumbnail",
|
|
39363
39373
|
style: {
|
|
39364
39374
|
width: "100%",
|
|
39365
|
-
height: "100%"
|
|
39375
|
+
height: "100%",
|
|
39376
|
+
objectFit: "cover"
|
|
39366
39377
|
}
|
|
39367
39378
|
}), /* @__PURE__ */ jsxs(Box$1, {
|
|
39368
39379
|
style: {
|
|
@@ -39468,7 +39479,8 @@ function SideDocsSelector({
|
|
|
39468
39479
|
alt: "thumbnail",
|
|
39469
39480
|
style: {
|
|
39470
39481
|
width: "100%",
|
|
39471
|
-
height: "100%"
|
|
39482
|
+
height: "100%",
|
|
39483
|
+
objectFit: "cover"
|
|
39472
39484
|
}
|
|
39473
39485
|
}), /* @__PURE__ */ jsxs(Box$1, {
|
|
39474
39486
|
style: {
|