easyproctor-hml 2.7.1 → 2.7.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/esm/index.js CHANGED
@@ -14413,16 +14413,19 @@ Setting: ${JSON.stringify(settings, null, 2)}`
14413
14413
  }
14414
14414
  if (this.isChunkEnabled) {
14415
14415
  if (this.backgroundUpload) {
14416
+ trackers.registerError(this.proctoringId, `Flush e parada do background upload`);
14416
14417
  try {
14417
14418
  if (this.pendingChunkSaves.length > 0) {
14418
14419
  console.log(`[CameraRecorder] Aguardando ${this.pendingChunkSaves.length} salvamentos de chunks pendentes...`);
14419
14420
  await Promise.all(this.pendingChunkSaves);
14420
14421
  }
14421
14422
  await this.backgroundUpload.flush();
14423
+ this.backgroundUpload.stop();
14422
14424
  } catch (e3) {
14423
14425
  console.warn("[CameraRecorder] Erro ao fazer flush dos chunks:", e3);
14426
+ trackers.registerError(this.proctoringId, `Flush Chunks
14427
+ Error: ${e3}`);
14424
14428
  }
14425
- this.backgroundUpload.stop();
14426
14429
  }
14427
14430
  this.removeLifecycleListeners();
14428
14431
  this.persistSessionState("FINISHED");
@@ -14449,6 +14452,8 @@ Setting: ${JSON.stringify(settings, null, 2)}`
14449
14452
  this.chunkIndex++;
14450
14453
  console.log(`[CameraRecorder] Chunk ${this.chunkIndex - 1} salvo no IndexedDB.`);
14451
14454
  } catch (error) {
14455
+ trackers.registerError(this.proctoringId, `Save Chunk
14456
+ Error: ${error}`);
14452
14457
  console.error("[CameraRecorder] Erro ao salvar chunk no IndexedDB:", error);
14453
14458
  }
14454
14459
  })();
@@ -16298,16 +16303,14 @@ var CapturePhoto = class {
16298
16303
  divBtn.appendChild(retakeBtn);
16299
16304
  divBtn.appendChild(confirmBtn);
16300
16305
  this.shot();
16301
- video.style.display = "none";
16302
- image.style.display = "block";
16306
+ this.closeInterface();
16307
+ resolve({ base64: this.base64 });
16303
16308
  });
16304
16309
  retakeBtn.addEventListener("click", () => {
16305
16310
  divBtn.appendChild(closeModalBtn);
16306
16311
  divBtn.appendChild(takePhotoBtn);
16307
16312
  divBtn.removeChild(retakeBtn);
16308
16313
  divBtn.removeChild(confirmBtn);
16309
- video.style.display = "block";
16310
- image.style.display = "none";
16311
16314
  });
16312
16315
  confirmBtn.addEventListener("click", () => {
16313
16316
  this.closeInterface();
package/index.js CHANGED
@@ -32510,16 +32510,19 @@ Setting: ${JSON.stringify(settings, null, 2)}`
32510
32510
  }
32511
32511
  if (this.isChunkEnabled) {
32512
32512
  if (this.backgroundUpload) {
32513
+ trackers.registerError(this.proctoringId, `Flush e parada do background upload`);
32513
32514
  try {
32514
32515
  if (this.pendingChunkSaves.length > 0) {
32515
32516
  console.log(`[CameraRecorder] Aguardando ${this.pendingChunkSaves.length} salvamentos de chunks pendentes...`);
32516
32517
  await Promise.all(this.pendingChunkSaves);
32517
32518
  }
32518
32519
  await this.backgroundUpload.flush();
32520
+ this.backgroundUpload.stop();
32519
32521
  } catch (e3) {
32520
32522
  console.warn("[CameraRecorder] Erro ao fazer flush dos chunks:", e3);
32523
+ trackers.registerError(this.proctoringId, `Flush Chunks
32524
+ Error: ${e3}`);
32521
32525
  }
32522
- this.backgroundUpload.stop();
32523
32526
  }
32524
32527
  this.removeLifecycleListeners();
32525
32528
  this.persistSessionState("FINISHED");
@@ -32546,6 +32549,8 @@ Setting: ${JSON.stringify(settings, null, 2)}`
32546
32549
  this.chunkIndex++;
32547
32550
  console.log(`[CameraRecorder] Chunk ${this.chunkIndex - 1} salvo no IndexedDB.`);
32548
32551
  } catch (error) {
32552
+ trackers.registerError(this.proctoringId, `Save Chunk
32553
+ Error: ${error}`);
32549
32554
  console.error("[CameraRecorder] Erro ao salvar chunk no IndexedDB:", error);
32550
32555
  }
32551
32556
  })();
@@ -34395,16 +34400,14 @@ var CapturePhoto = class {
34395
34400
  divBtn.appendChild(retakeBtn);
34396
34401
  divBtn.appendChild(confirmBtn);
34397
34402
  this.shot();
34398
- video.style.display = "none";
34399
- image.style.display = "block";
34403
+ this.closeInterface();
34404
+ resolve({ base64: this.base64 });
34400
34405
  });
34401
34406
  retakeBtn.addEventListener("click", () => {
34402
34407
  divBtn.appendChild(closeModalBtn);
34403
34408
  divBtn.appendChild(takePhotoBtn);
34404
34409
  divBtn.removeChild(retakeBtn);
34405
34410
  divBtn.removeChild(confirmBtn);
34406
- video.style.display = "block";
34407
- image.style.display = "none";
34408
34411
  });
34409
34412
  confirmBtn.addEventListener("click", () => {
34410
34413
  this.closeInterface();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor-hml",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",