metag-sdk-ionic 1.0.1 → 1.1.2
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/assets/imagesIdVision/no-internet.svg +4 -0
- package/dist/src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.d.ts.map +1 -1
- package/dist/src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.js +26 -33
- package/dist/src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.js.map +1 -1
- package/dist/src/app/pages/id-vision/components/camera-with-overlay/camera-with-overlay.component.d.ts +19 -15
- package/dist/src/app/pages/id-vision/components/camera-with-overlay/camera-with-overlay.component.d.ts.map +1 -1
- package/dist/src/app/pages/id-vision/components/camera-with-overlay/camera-with-overlay.component.js +157 -123
- package/dist/src/app/pages/id-vision/components/camera-with-overlay/camera-with-overlay.component.js.map +1 -1
- package/dist/src/app/pages/id-vision/id-vision.component.d.ts +13 -3
- package/dist/src/app/pages/id-vision/id-vision.component.d.ts.map +1 -1
- package/dist/src/app/pages/id-vision/id-vision.component.js +316 -258
- package/dist/src/app/pages/id-vision/id-vision.component.js.map +1 -1
- package/dist/src/app/pages/id-vision/services/dpi/dpi-service.service.d.ts +1 -1
- package/dist/src/app/pages/id-vision/services/dpi/dpi-service.service.d.ts.map +1 -1
- package/dist/src/app/pages/id-vision/services/dpi/dpi-service.service.js +7 -6
- package/dist/src/app/pages/id-vision/services/dpi/dpi-service.service.js.map +1 -1
- package/package.json +13 -12
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="139" height="148" viewBox="0 0 139 148" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M69.4986 18.6125C47.6437 18.6125 27.0935 27.6852 11.6268 44.1626L2.17627 54.242L14.0593 66.9129L23.5099 56.832C35.7969 43.7417 52.1294 36.5329 69.4986 36.5329C86.8664 36.5329 103.208 43.7324 115.486 56.832L117.902 59.422C121.571 60.2468 125.065 61.5788 128.355 63.2731L136.819 54.242L127.369 44.1626C111.902 27.6852 91.3607 18.6125 69.4986 18.6125ZM69.4986 54.4532C56.6136 54.4532 44.4989 59.7904 35.3929 69.5029L25.9424 79.5824L37.8254 92.2533L47.276 82.1724C53.2095 75.8469 61.1079 72.3735 69.4986 72.3735C71.5344 72.3735 73.5368 72.6001 75.4973 73.0025C80.3522 67.7516 86.3118 63.7078 92.9679 61.2072C85.8499 56.9337 77.8878 54.4532 69.4986 54.4532ZM107.366 76.2755C91.1001 76.2755 77.9124 90.3154 77.9124 107.636C77.9124 124.955 91.1001 138.995 107.366 138.995C123.633 138.995 136.819 124.955 136.819 107.636C136.819 90.3154 123.633 76.2755 107.366 76.2755ZM103.158 89.7157H111.574V107.636H103.158V89.7157ZM64.8305 91.168C62.7687 91.9111 60.8097 93.0874 59.159 94.8433L49.7085 104.923L63.581 119.729C62.6644 115.858 62.1186 111.811 62.1186 107.636C62.1186 101.847 63.1046 96.3202 64.8305 91.168ZM103.158 116.596H111.574V125.556H103.158V116.596Z" fill="#FCB332"/>
|
|
3
|
+
</svg>
|
|
4
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camara-video-selfie.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"camara-video-selfie.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAEZ,SAAS,EAET,SAAS,EAGV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAA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Y,EACvB,QAAQ,EAAE,SAAS,EACnB,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,iBAAiB,EACjC,wBAAwB,EAAE,wBAAwB,EAClD,gBAAgB,EAAE,gBAAgB;IAMtC,eAAe;IAsBf,WAAW;IAaX,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQnC,kBAAkB;IAYlB,UAAU;IAqCV,cAAc;IA2CpB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQ9C,WAAW;IAYL,gBAAgB;IA0BtB,mBAAmB;IAeb,aAAa;IAgBb,iBAAiB;IAUvB,UAAU;IAQH,sBAAsB;yCAhRlB,0BAA0B;2CAA1B,0BAA0B;CAoRtC"}
|
package/dist/src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, Output, Renderer2, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, Output, Renderer2, ViewChild, ViewEncapsulation, } from '@angular/core';
|
|
3
3
|
import { AlertController, ModalController, Platform } from '@ionic/angular';
|
|
4
4
|
import { Camera } from '@capacitor/camera';
|
|
5
5
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
@@ -64,13 +64,13 @@ export class CamaraVideoSelfieComponent {
|
|
|
64
64
|
this.isRecording = false;
|
|
65
65
|
this.mediaRecorder = null;
|
|
66
66
|
this.recordedChunks = [];
|
|
67
|
-
this.countdown = 0;
|
|
68
|
-
this.minRecordingTime = 3000;
|
|
69
|
-
this.maxRecordingTime = 5000;
|
|
70
|
-
this.timeRemaining = this.maxRecordingTime / 1000;
|
|
67
|
+
this.countdown = 0;
|
|
68
|
+
this.minRecordingTime = 3000;
|
|
69
|
+
this.maxRecordingTime = 5000;
|
|
70
|
+
this.timeRemaining = this.maxRecordingTime / 1000;
|
|
71
71
|
this.canStopRecording = true;
|
|
72
|
-
this.isLoading = true;
|
|
73
|
-
this.defaultBrightness = null;
|
|
72
|
+
this.isLoading = true;
|
|
73
|
+
this.defaultBrightness = null;
|
|
74
74
|
this.isAndroid = this.platform.is('android');
|
|
75
75
|
this.isIOS = this.platform.is('ios');
|
|
76
76
|
}
|
|
@@ -88,7 +88,6 @@ export class CamaraVideoSelfieComponent {
|
|
|
88
88
|
yield this.requestPermissions();
|
|
89
89
|
}
|
|
90
90
|
yield this.initCamera();
|
|
91
|
-
// await this.startRecording();
|
|
92
91
|
yield this.waitForCameraReady();
|
|
93
92
|
this.modalDpiServices.closeModalAndChangeBrightness$.subscribe(() => __awaiter(this, void 0, void 0, function* () {
|
|
94
93
|
yield this.closeOverlayVideo();
|
|
@@ -145,11 +144,9 @@ export class CamaraVideoSelfieComponent {
|
|
|
145
144
|
};
|
|
146
145
|
this.stream = yield navigator.mediaDevices.getUserMedia(constraints);
|
|
147
146
|
this.videoElement.nativeElement.srcObject = this.stream;
|
|
148
|
-
// Esperar hasta que la cámara esté lista
|
|
149
147
|
this.videoElement.nativeElement.onloadedmetadata = () => {
|
|
150
148
|
isCameraReady = true;
|
|
151
149
|
};
|
|
152
|
-
// Espera activa para asegurarte de que está lista
|
|
153
150
|
yield new Promise((resolve) => {
|
|
154
151
|
const interval = setInterval(() => {
|
|
155
152
|
if (isCameraReady) {
|
|
@@ -171,31 +168,34 @@ export class CamaraVideoSelfieComponent {
|
|
|
171
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
169
|
if (!this.stream)
|
|
173
170
|
return;
|
|
171
|
+
if (this.mediaRecorder && this.mediaRecorder.state !== 'inactive') {
|
|
172
|
+
this.mediaRecorder.stop();
|
|
173
|
+
}
|
|
174
174
|
const options = {
|
|
175
175
|
mimeType: this.isIOS ? 'video/mp4' : 'video/webm',
|
|
176
176
|
videoBitsPerSecond: 400000,
|
|
177
177
|
};
|
|
178
|
+
this.recordedChunks = [];
|
|
178
179
|
this.mediaRecorder = new MediaRecorder(this.stream, options);
|
|
179
|
-
let chunks = [];
|
|
180
180
|
this.mediaRecorder.ondataavailable = (event) => {
|
|
181
181
|
if (event.data.size > 0) {
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
182
|
+
this.recordedChunks.push(event.data);
|
|
185
183
|
}
|
|
186
184
|
};
|
|
187
185
|
this.mediaRecorder.onstop = () => __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
if (
|
|
186
|
+
if (this.recordedChunks.length === 0) {
|
|
189
187
|
console.error('No se capturaron datos en la grabación.');
|
|
190
188
|
return;
|
|
191
189
|
}
|
|
192
190
|
const fileType = this.isIOS ? 'video/mp4' : 'video/webm';
|
|
193
191
|
const fileExtension = this.isIOS ? 'mp4' : 'webm';
|
|
194
|
-
const videoBlob = new Blob(
|
|
192
|
+
const videoBlob = new Blob(this.recordedChunks, { type: fileType });
|
|
195
193
|
const videoFile = this.blobToFile(videoBlob, `video-selfie.${fileExtension}`);
|
|
194
|
+
this.capVideo = videoFile;
|
|
196
195
|
if (this.backFunction) {
|
|
197
196
|
yield this.backFunction(videoFile);
|
|
198
197
|
}
|
|
198
|
+
this.recordedChunks = [];
|
|
199
199
|
});
|
|
200
200
|
});
|
|
201
201
|
}
|
|
@@ -204,19 +204,17 @@ export class CamaraVideoSelfieComponent {
|
|
|
204
204
|
b.lastModified = new Date().getTime();
|
|
205
205
|
b.lastModifiedDate = new Date();
|
|
206
206
|
b.name = fileName;
|
|
207
|
-
//Cast to a File() type
|
|
208
207
|
return b;
|
|
209
208
|
}
|
|
210
209
|
recordVideo() {
|
|
211
|
-
// Mostrar la cuenta regresiva antes de iniciar la grabación
|
|
212
210
|
this.countdown = 3;
|
|
213
211
|
const countdownInterval = setInterval(() => {
|
|
214
212
|
this.countdown -= 1;
|
|
215
213
|
if (this.countdown <= 0) {
|
|
216
214
|
clearInterval(countdownInterval);
|
|
217
|
-
this.startVideoRecord();
|
|
215
|
+
this.startVideoRecord();
|
|
218
216
|
}
|
|
219
|
-
this.changeDetector.detectChanges();
|
|
217
|
+
this.changeDetector.detectChanges();
|
|
220
218
|
}, 1000);
|
|
221
219
|
}
|
|
222
220
|
startVideoRecord() {
|
|
@@ -225,11 +223,10 @@ export class CamaraVideoSelfieComponent {
|
|
|
225
223
|
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
226
224
|
this.mediaRecorder.start(100);
|
|
227
225
|
this.isRecording = true;
|
|
228
|
-
this.canStopRecording = false;
|
|
226
|
+
this.canStopRecording = false;
|
|
229
227
|
this.renderer.addClass(this.progressRing.nativeElement, 'progress-active');
|
|
230
|
-
this.timeRemaining = this.maxRecordingTime / 1000;
|
|
231
|
-
this.updateTimeRemaining();
|
|
232
|
-
// Habilitar el botón de detener después de minRecordingTime
|
|
228
|
+
this.timeRemaining = this.maxRecordingTime / 1000;
|
|
229
|
+
this.updateTimeRemaining();
|
|
233
230
|
setTimeout(() => {
|
|
234
231
|
this.canStopRecording = true;
|
|
235
232
|
}, this.minRecordingTime);
|
|
@@ -240,7 +237,7 @@ export class CamaraVideoSelfieComponent {
|
|
|
240
237
|
});
|
|
241
238
|
}
|
|
242
239
|
updateTimeRemaining() {
|
|
243
|
-
const interval = 1000;
|
|
240
|
+
const interval = 1000;
|
|
244
241
|
const timer = setInterval(() => {
|
|
245
242
|
if (this.isRecording) {
|
|
246
243
|
this.timeRemaining -= 1;
|
|
@@ -251,27 +248,24 @@ export class CamaraVideoSelfieComponent {
|
|
|
251
248
|
else {
|
|
252
249
|
clearInterval(timer);
|
|
253
250
|
}
|
|
254
|
-
this.changeDetector.detectChanges();
|
|
251
|
+
this.changeDetector.detectChanges();
|
|
255
252
|
}, interval);
|
|
256
253
|
}
|
|
257
254
|
stopRecording() {
|
|
258
255
|
return __awaiter(this, void 0, void 0, function* () {
|
|
259
256
|
if (this.mediaRecorder && this.isRecording && this.canStopRecording) {
|
|
260
|
-
yield this.backFunction(this.capVideo);
|
|
261
257
|
this.mediaRecorder.stop();
|
|
262
258
|
this.isRecording = false;
|
|
263
259
|
}
|
|
264
260
|
if (this.scanTimeout) {
|
|
265
261
|
clearTimeout(this.scanTimeout);
|
|
266
262
|
}
|
|
267
|
-
// Detiene la animación del borde circular
|
|
268
263
|
this.renderer.removeClass(this.progressRing.nativeElement, 'progress-active');
|
|
269
264
|
});
|
|
270
265
|
}
|
|
271
266
|
closeOverlayVideo() {
|
|
272
267
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
268
|
this.stopCamera();
|
|
274
|
-
// Restaura el brillo original si estaba guardado
|
|
275
269
|
if (this.defaultBrightness !== null) {
|
|
276
270
|
yield ScreenBrightness.setBrightness({
|
|
277
271
|
brightness: this.defaultBrightness,
|
|
@@ -291,7 +285,6 @@ export class CamaraVideoSelfieComponent {
|
|
|
291
285
|
closeRequestedFunction() {
|
|
292
286
|
this.closeOverlayVideo();
|
|
293
287
|
this.modalDpiServices.requestCloseModalAndBrightness();
|
|
294
|
-
// this.modalVideoSelfieServices.requestCloseOverlayModal();
|
|
295
288
|
}
|
|
296
289
|
}
|
|
297
290
|
CamaraVideoSelfieComponent.ɵfac = function CamaraVideoSelfieComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CamaraVideoSelfieComponent)(i0.ɵɵdirectiveInject(i1.Platform), i0.ɵɵdirectiveInject(i1.ModalController), i0.ɵɵdirectiveInject(i2.DomSanitizer), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i1.AlertController), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i3.ModalVideoSelfieServices), i0.ɵɵdirectiveInject(i4.ModalDpiServices)); };
|
|
@@ -321,7 +314,7 @@ CamaraVideoSelfieComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
321
314
|
i0.ɵɵtext(16);
|
|
322
315
|
i0.ɵɵelementEnd();
|
|
323
316
|
i0.ɵɵelementStart(17, "p", 16);
|
|
324
|
-
i0.ɵɵtext(18, "Permanece quieto, con tu rostro en el centro del
|
|
317
|
+
i0.ɵɵtext(18, "Permanece quieto, con tu rostro en el centro del c\u00EDrculo.");
|
|
325
318
|
i0.ɵɵelementEnd();
|
|
326
319
|
i0.ɵɵelementStart(19, "div", 17);
|
|
327
320
|
i0.ɵɵtemplate(20, CamaraVideoSelfieComponent_ion_button_20_Template, 2, 0, "ion-button", 18)(21, CamaraVideoSelfieComponent_ion_button_21_Template, 2, 1, "ion-button", 19);
|
|
@@ -341,10 +334,10 @@ CamaraVideoSelfieComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
341
334
|
i0.ɵɵproperty("ngIf", !ctx.isRecording);
|
|
342
335
|
i0.ɵɵadvance();
|
|
343
336
|
i0.ɵɵproperty("ngIf", ctx.isRecording);
|
|
344
|
-
} }, dependencies: [i5.NgClass, i5.NgIf, i1.IonButton, i1.IonButtons, i1.IonContent, i1.IonHeader, i1.IonIcon, i1.IonLabel, i1.IonSpinner, i1.IonToolbar], styles: [".camera-container[_ngcontent-%COMP%] {\n justify-content: center;\n align-items: center;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 70%;\n background-color: white;\n}\n\n.video-wrapper[_ngcontent-%COMP%] {\n position: relative;\n width: 300px;\n height: 300px;\n border-radius: 50%;\n overflow: hidden;\n}\n\nvideo[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n}\n\n.progress-ring[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n left: 0;\n transform: rotate(-90deg); \n\n}\n\n.progress-ring__circle[_ngcontent-%COMP%] {\n fill: transparent;\n stroke: purple;\n stroke-width: 12;\n stroke-dasharray: 945; \n\n stroke-dashoffset: 880; \n\n transition: stroke-dashoffset 12s linear; \n\n}\n\n.progress-active[_ngcontent-%COMP%] .progress-ring__circle[_ngcontent-%COMP%] {\n animation: _ngcontent-%COMP%_progress-animation 5s linear forwards;\n}\n\n@keyframes _ngcontent-%COMP%_progress-animation {\n from {\n stroke-dashoffset: 880;\n }\n to {\n stroke-dashoffset: 0;\n }\n}\n\n
|
|
337
|
+
} }, dependencies: [i5.NgClass, i5.NgIf, i1.IonButton, i1.IonButtons, i1.IonContent, i1.IonHeader, i1.IonIcon, i1.IonLabel, i1.IonSpinner, i1.IonToolbar], styles: [".camera-container[_ngcontent-%COMP%] {\n justify-content: center;\n align-items: center;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 70%;\n background-color: white;\n}\n\n.video-wrapper[_ngcontent-%COMP%] {\n position: relative;\n width: 300px;\n height: 300px;\n border-radius: 50%;\n overflow: hidden;\n}\n\nvideo[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n}\n\n.progress-ring[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n left: 0;\n transform: rotate(-90deg); \n\n}\n\n.progress-ring__circle[_ngcontent-%COMP%] {\n fill: transparent;\n stroke: purple;\n stroke-width: 12;\n stroke-dasharray: 945; \n\n stroke-dashoffset: 880; \n\n transition: stroke-dashoffset 12s linear; \n\n}\n\n.progress-active[_ngcontent-%COMP%] .progress-ring__circle[_ngcontent-%COMP%] {\n animation: _ngcontent-%COMP%_progress-animation 5s linear forwards;\n}\n\n@keyframes _ngcontent-%COMP%_progress-animation {\n from {\n stroke-dashoffset: 880;\n }\n to {\n stroke-dashoffset: 0;\n }\n}\n\n.text-container[_ngcontent-%COMP%] {\n height: 40px;\n color: black;\n}\n\nion-header[_ngcontent-%COMP%] {\n --background: #ffffff; \n\n}\n\n\n\n.centered-title[_ngcontent-%COMP%] {\n text-align: center;\n width: 100%; \n\n font-weight: bold;\n}\n\n.fixed-footer[_ngcontent-%COMP%] {\n\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 10px;\n background-color: #fff; // Color de fondo, opcional\n // box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);\n\n ion-button {\n width: 90%;\n max-width: 300px;\n margin: 0 auto;\n background-color: #ffcc00;\n color: #ffffff;\n font-weight: bold;\n border-radius: 20px;\n\n --background: var(--purple-primary);\n --background-hover: var(--purple-secondary);\n --background-activated: var(--purple-secondary);\n --background-focused: var(--purple-secondary);\n \n --color: var(--purple-primary);\n \n --border-radius: 20px;\n --border-color: var(--purple-primary);\n --border-style: solid;\n --border-width: 1px;\n \n --box-shadow: 0 2px 6px 0 rgb(0, 0, 0, 0.25);\n \n --ripple-color: var(--purple-secondary);\n \n\n &:hover {\n background-color: #ffb300;\n }\n\n &:active {\n background-color: #e6a800;\n }\n }\n}\n\n\nion-header[_ngcontent-%COMP%] {\n --background: #ffffff; \n\n color: #000000; \n\n}\n\nion-toolbar[_ngcontent-%COMP%] {\n --ion-background-color: #ffffff !important;\n --background: #ffffff !important;\n color: #000000;\n}\n\n\nion-header[_ngcontent-%COMP%] {\n --background: #ffffff; \n\n}\n\nion-toolbar[_ngcontent-%COMP%] {\n --ion-background-color: #ffffff !important;\n --background: #ffffff !important;\n color: #000000;\n display: flex;\n justify-content: space-between; \n\n align-items: center;\n}\n\n.centered-title[_ngcontent-%COMP%] {\n flex: 1;\n text-align: center; \n\n font-weight: bold;\n color: #000000;\n margin: 0; \n\n}\n\nion-buttons[_ngcontent-%COMP%] {\n justify-content: flex-end; \n\n}\n.countdown-overlay[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.6); \n\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0;\n padding: 0;\n z-index: 1000; \n\n animation: _ngcontent-%COMP%_fadeIn 0.5s ease-out, _ngcontent-%COMP%_fadeOut 0.5s ease-out 2.5s; \n\n box-sizing: border-box;\n border-radius: 0px;\n\n}\n\nion-content.custom-content[_ngcontent-%COMP%] {\n --padding-top: 0;\n --padding-bottom: 0;\n margin: 0;\n padding: 0;\n}\n\n.countdown[_ngcontent-%COMP%] {\n font-size: 100px;\n font-weight: bold;\n color: white;\n animation: _ngcontent-%COMP%_scaleUp 0.5s ease-out, _ngcontent-%COMP%_scaleDown 0.5s ease-out 2.5s; \n\n}\n\n\n\n@keyframes _ngcontent-%COMP%_fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes _ngcontent-%COMP%_fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n\n\n@keyframes _ngcontent-%COMP%_scaleUp {\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n@keyframes _ngcontent-%COMP%_scaleDown {\n from {\n transform: scale(1);\n opacity: 1;\n }\n to {\n transform: scale(0.8);\n opacity: 0;\n }\n}\n\n.red[_ngcontent-%COMP%] {\n padding: 10px;\n color: red;\n}\n\n.text-center[_ngcontent-%COMP%]{\n text-align: center;\n padding-left: 20%;\n padding-right: 20%;\n color: #333;\n}\n\n.loading-overlay[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.8); \n\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000; \n\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n border-radius: 0px;\n}\n\nion-spinner[_ngcontent-%COMP%] {\n color: white;\n width: 50px;\n height: 50px;\n}"] });
|
|
345
338
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CamaraVideoSelfieComponent, [{
|
|
346
339
|
type: Component,
|
|
347
|
-
args: [{ selector: 'app-camara-video-selfie', encapsulation: ViewEncapsulation.Emulated, template: "<ion-content color=\"light\" class=\"custom-content\">\n <div *ngIf=\"isLoading\" class=\"loading-overlay\">\n <ion-spinner name=\"crescent\"></ion-spinner>\n </div>\n \n <div *ngIf=\"countdown > 0\" class=\"countdown-overlay\">\n <div class=\"countdown\">{{ countdown }}</div>\n </div>\n <ion-header class=\"ion-no-border\">\n <ion-toolbar color=\"light\">\n <!-- <ion-title class=\"centered-title\">Video Selfie</ion-title> -->\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"closeOverlayVideo()\" [disabled]=\"!canStopRecording\">\n <ion-icon name=\"close\"></ion-icon>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <!-- Contenedor de la c\u00E1mara y progresi\u00F3n -->\n <div class=\"camera-container\">\n <div class=\"video-wrapper\">\n <video #videoElement muted autoplay playsinline style=\"transform: scaleX(-1)\"></video>\n <svg class=\"progress-ring\" #progressRing width=\"300\" height=\"300\">\n <circle class=\"progress-ring__circle\" cx=\"150\" cy=\"150\" r=\"150\" />\n </svg>\n </div>\n <ion-label [ngClass]=\"{'red': isRecording}\">00:{{ timeRemaining < 10 ? '0' + timeRemaining : timeRemaining\n }}</ion-label>\n <p class=\"text-center\">Permanece quieto, con tu rostro en el centro del
|
|
340
|
+
args: [{ selector: 'app-camara-video-selfie', encapsulation: ViewEncapsulation.Emulated, template: "<ion-content color=\"light\" class=\"custom-content\">\n <div *ngIf=\"isLoading\" class=\"loading-overlay\">\n <ion-spinner name=\"crescent\"></ion-spinner>\n </div>\n \n <div *ngIf=\"countdown > 0\" class=\"countdown-overlay\">\n <div class=\"countdown\">{{ countdown }}</div>\n </div>\n <ion-header class=\"ion-no-border\">\n <ion-toolbar color=\"light\">\n <!-- <ion-title class=\"centered-title\">Video Selfie</ion-title> -->\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"closeOverlayVideo()\" [disabled]=\"!canStopRecording\">\n <ion-icon name=\"close\"></ion-icon>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <!-- Contenedor de la c\u00E1mara y progresi\u00F3n -->\n <div class=\"camera-container\">\n <div class=\"video-wrapper\">\n <video #videoElement muted autoplay playsinline style=\"transform: scaleX(-1)\"></video>\n <svg class=\"progress-ring\" #progressRing width=\"300\" height=\"300\">\n <circle class=\"progress-ring__circle\" cx=\"150\" cy=\"150\" r=\"150\" />\n </svg>\n </div>\n <ion-label [ngClass]=\"{'red': isRecording}\">00:{{ timeRemaining < 10 ? '0' + timeRemaining : timeRemaining\n }}</ion-label>\n <p class=\"text-center\">Permanece quieto, con tu rostro en el centro del c\u00EDrculo.</p>\n <!-- Botones de grabaci\u00F3n -->\n <div class=\"fixed-footer\">\n <ion-button *ngIf=\"!isRecording\" expand=\"block\" (click)=\"recordVideo()\">Iniciar Grabaci\u00F3n</ion-button>\n <ion-button *ngIf=\"isRecording\" expand=\"block\" (click)=\"stopRecording()\" [disabled]=\"!canStopRecording\">Detener\n Grabaci\u00F3n</ion-button>\n </div>\n </div>\n</ion-content>", styles: [".camera-container {\n justify-content: center;\n align-items: center;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 70%;\n background-color: white;\n}\n\n.video-wrapper {\n position: relative;\n width: 300px;\n height: 300px;\n border-radius: 50%;\n overflow: hidden;\n}\n\nvideo {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n}\n\n.progress-ring {\n position: absolute;\n top: 0;\n left: 0;\n transform: rotate(-90deg); /* Rotamos el c\u00EDrculo para que la animaci\u00F3n inicie desde arriba */\n}\n\n.progress-ring__circle {\n fill: transparent;\n stroke: purple;\n stroke-width: 12;\n stroke-dasharray: 945; /* La circunferencia del c\u00EDrculo 880*/\n stroke-dashoffset: 880; /* Oculto por completo al inicio */\n transition: stroke-dashoffset 12s linear; /* Esto controlar\u00E1 el llenado progresivo */\n}\n\n.progress-active .progress-ring__circle {\n animation: progress-animation 5s linear forwards;\n}\n\n@keyframes progress-animation {\n from {\n stroke-dashoffset: 880;\n }\n to {\n stroke-dashoffset: 0;\n }\n}\n\n.text-container {\n height: 40px;\n color: black;\n}\n\nion-header {\n --background: #ffffff; /* Fondo blanco para el header */\n}\n\n\n\n.centered-title {\n text-align: center;\n width: 100%; /* Asegura que el t\u00EDtulo est\u00E9 centrado */\n font-weight: bold;\n}\n\n.fixed-footer {\n\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 10px;\n background-color: #fff; // Color de fondo, opcional\n // box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);\n\n ion-button {\n width: 90%;\n max-width: 300px;\n margin: 0 auto;\n background-color: #ffcc00;\n color: #ffffff;\n font-weight: bold;\n border-radius: 20px;\n\n --background: var(--purple-primary);\n --background-hover: var(--purple-secondary);\n --background-activated: var(--purple-secondary);\n --background-focused: var(--purple-secondary);\n \n --color: var(--purple-primary);\n \n --border-radius: 20px;\n --border-color: var(--purple-primary);\n --border-style: solid;\n --border-width: 1px;\n \n --box-shadow: 0 2px 6px 0 rgb(0, 0, 0, 0.25);\n \n --ripple-color: var(--purple-secondary);\n \n\n &:hover {\n background-color: #ffb300;\n }\n\n &:active {\n background-color: #e6a800;\n }\n }\n}\n\n\nion-header {\n --background: #ffffff; /* Fondo blanco */\n color: #000000; /* Texto negro */\n}\n\nion-toolbar {\n --ion-background-color: #ffffff !important;\n --background: #ffffff !important;\n color: #000000;\n}\n\n\nion-header {\n --background: #ffffff; /* Fondo blanco */\n}\n\nion-toolbar {\n --ion-background-color: #ffffff !important;\n --background: #ffffff !important;\n color: #000000;\n display: flex;\n justify-content: space-between; /* Espacio entre t\u00EDtulo y bot\u00F3n */\n align-items: center;\n}\n\n.centered-title {\n flex: 1;\n text-align: center; /* Centrar el t\u00EDtulo */\n font-weight: bold;\n color: #000000;\n margin: 0; /* Quita cualquier margen del t\u00EDtulo */\n}\n\nion-buttons {\n justify-content: flex-end; /* Alinea el bot\u00F3n a la derecha */\n}\n.countdown-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.6); /* Fondo semi-transparente */\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0;\n padding: 0;\n z-index: 1000; /* Asegurarse de que est\u00E9 encima de otros elementos */\n animation: fadeIn 0.5s ease-out, fadeOut 0.5s ease-out 2.5s; /* Animaciones de entrada y salida */\n box-sizing: border-box;\n border-radius: 0px;\n\n}\n\nion-content.custom-content {\n --padding-top: 0;\n --padding-bottom: 0;\n margin: 0;\n padding: 0;\n}\n\n.countdown {\n font-size: 100px;\n font-weight: bold;\n color: white;\n animation: scaleUp 0.5s ease-out, scaleDown 0.5s ease-out 2.5s; /* Escalar en entrada y salida */\n}\n\n/* Animaci\u00F3n para desvanecer la superposici\u00F3n */\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n/* Animaci\u00F3n para escalar el n\u00FAmero */\n@keyframes scaleUp {\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n@keyframes scaleDown {\n from {\n transform: scale(1);\n opacity: 1;\n }\n to {\n transform: scale(0.8);\n opacity: 0;\n }\n}\n\n.red {\n padding: 10px;\n color: red;\n}\n\n.text-center{\n text-align: center;\n padding-left: 20%;\n padding-right: 20%;\n color: #333;\n}\n\n.loading-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro semi-transparente */\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000; /* Aseg\u00FArate de que est\u00E9 por encima del contenido */\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n border-radius: 0px;\n}\n\nion-spinner {\n color: white;\n width: 50px;\n height: 50px;\n}\n\n\n\n"] }]
|
|
348
341
|
}], () => [{ type: i1.Platform }, { type: i1.ModalController }, { type: i2.DomSanitizer }, { type: i0.Renderer2 }, { type: i1.AlertController }, { type: i0.ChangeDetectorRef }, { type: i3.ModalVideoSelfieServices }, { type: i4.ModalDpiServices }], { videoElement: [{
|
|
349
342
|
type: ViewChild,
|
|
350
343
|
args: ['videoElement']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camara-video-selfie.component.js","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.ts","../../../../../../../src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.html"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"camara-video-selfie.component.js","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.ts","../../../../../../../src/app/pages/id-vision/components/camara-video-selfie/camara-video-selfie.component.html"],"names":[],"mappings":";AAAA,OAAO,EAEL,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,SAAS,EACT,SAAS,EACT,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;;;;;;;;;;;IClB1C,+BAA+C;IAC7C,kCAA2C;IAC7C,iBAAM;;;IAGJ,AADF,+BAAqD,cAC5B;IAAA,YAAe;IACxC,AADwC,iBAAM,EACxC;;;IADmB,eAAe;IAAf,sCAAe;;;;IA0BhC,sCAAwE;IAAxB,kMAAS,oBAAa,KAAC;IAAC,sCAAiB;IAAA,iBAAa;;;;IACtG,sCAAwG;IAAzD,kMAAS,sBAAe,KAAC;IAAgC,sCAC7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AAgB,CAAC,8BAA8B,EAAE,CAAC;IACzD,CAAC;;oIAnRU,0BAA0B;6EAA1B,0BAA0B;;;;;;;;;QC3BvC,sCAAkD;QAKhD,AAJA,2EAA+C,8DAIM;QAO/C,AADF,AAFF,AADF,qCAAkC,qBACL,qBAED,oBACmD;QAA7D,iJAAS,uBAAmB,KAAC;QACvC,8BAAkC;QAI1C,AADE,AADE,AADE,iBAAa,EACD,EACF,EACH;QAIX,AADF,+BAA8B,cACD;QACzB,gCAAsF;;QACtF,mCAAkE;QAChE,8BAAkE;QAEtE,AADE,iBAAM,EACF;;QACN,sCAA4C;QAAA,aACtC;QAAA,iBAAY;QACd,8BAAuB;QAAA,+EAAyD;QAAA,iBAAI;QAEpF,gCAA0B;QAExB,AADA,4FAAwE,+EACgC;QAIlH,AADE,AADM,iBAAM,EACN,EACM;;QApCN,cAAe;QAAf,oCAAe;QAIf,cAAmB;QAAnB,wCAAmB;QAOuB,eAA8B;QAA9B,gDAA8B;QAejE,eAAgC;QAAhC,qEAAgC;QAAC,cACtC;QADsC,sGACtC;QAIa,eAAkB;QAAlB,uCAAkB;QAClB,cAAiB;QAAjB,sCAAiB;;iFDN3B,0BAA0B;cANtC,SAAS;2BACE,yBAAyB,iBAGpB,iBAAiB,CAAC,QAAQ;8PAGd,YAAY;kBAAtC,SAAS;mBAAC,cAAc;YACE,YAAY;kBAAtC,SAAS;mBAAC,cAAc;YAEhB,KAAK;kBAAb,KAAK;YACG,KAAK;kBAAb,KAAK;YACG,YAAY;kBAApB,KAAK;YACI,cAAc;kBAAvB,MAAM;;kFAPI,0BAA0B"}
|
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import { ModalController, Platform } from '@ionic/angular';
|
|
3
|
-
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
|
|
4
3
|
import { ModalDpiServices } from '../../services/modal-services/modal-dpi-services';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
interface CamInfo {
|
|
6
|
+
label: string;
|
|
7
|
+
deviceId: string;
|
|
8
|
+
}
|
|
6
9
|
export declare class CameraWithOverlayComponent implements AfterViewInit, OnDestroy {
|
|
7
10
|
private platform;
|
|
8
11
|
private modalController;
|
|
9
|
-
private sanitizer;
|
|
10
12
|
private modaldpiServices;
|
|
11
13
|
videoElement: ElementRef<HTMLVideoElement>;
|
|
12
14
|
text1: string;
|
|
13
15
|
text2: string;
|
|
14
16
|
overlaySrc: string;
|
|
15
|
-
onTakePicture: (
|
|
17
|
+
onTakePicture: (file: File) => Promise<boolean>;
|
|
16
18
|
closeRequested: EventEmitter<void>;
|
|
17
|
-
capturedImage: SafeUrl | null;
|
|
18
19
|
stream: MediaStream | null;
|
|
19
|
-
private isAndroid;
|
|
20
|
-
private isIOS;
|
|
21
20
|
isLoading: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
rearCams: CamInfo[];
|
|
22
|
+
selectedCamId: string | null;
|
|
23
|
+
currentRearIndex: number;
|
|
24
|
+
private readonly isMobile;
|
|
25
|
+
constructor(platform: Platform, modalController: ModalController, modaldpiServices: ModalDpiServices);
|
|
26
26
|
ngAfterViewInit(): Promise<void>;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
ngOnDestroy(): void;
|
|
28
|
+
private requestPermissions;
|
|
29
|
+
private enumerateRearCams;
|
|
30
|
+
openCamera(deviceId?: string): Promise<void>;
|
|
31
|
+
/** Avanza al siguiente sensor trasero en modo carrusel */
|
|
32
|
+
toggleRearCam(): void;
|
|
33
|
+
private attachStream;
|
|
29
34
|
capturePhoto(): Promise<void>;
|
|
30
|
-
|
|
31
|
-
stopCamera(): void;
|
|
35
|
+
private stopCamera;
|
|
32
36
|
closeOverlay(): void;
|
|
33
|
-
closeRequestedFunction(): void;
|
|
34
37
|
resumeCamera(): void;
|
|
35
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<CameraWithOverlayComponent, never>;
|
|
36
39
|
static ɵcmp: i0.ɵɵComponentDeclaration<CameraWithOverlayComponent, "app-camera-overlay", never, { "text1": { "alias": "text1"; "required": false; }; "text2": { "alias": "text2"; "required": false; }; "overlaySrc": { "alias": "overlaySrc"; "required": false; }; "onTakePicture": { "alias": "onTakePicture"; "required": false; }; }, { "closeRequested": "closeRequested"; }, never, never, false, never>;
|
|
37
40
|
}
|
|
41
|
+
export {};
|
|
38
42
|
//# sourceMappingURL=camera-with-overlay.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera-with-overlay.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/camera-with-overlay/camera-with-overlay.component.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"camera-with-overlay.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/app/pages/id-vision/components/camera-with-overlay/camera-with-overlay.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,UAAU,EACV,YAAY,EAEZ,SAAS,EAIV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;;AAEpF,UAAU,OAAO;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAMa,0BAA2B,YAAW,aAAa,EAAE,SAAS;IAoBvE,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,gBAAgB;IArBC,YAAY,EAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAG9D,KAAK,SAAM;IACX,KAAK,SAAM;IACX,UAAU,SAAM;IAChB,aAAa,EAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,cAAc,qBAA4B;IAGpD,M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