@jaak.ai/stamps 2.0.0-dev.39 → 2.0.0-dev.40

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.
@@ -1820,7 +1820,12 @@ const JaakStamps = class {
1820
1820
  }
1821
1821
  }
1822
1822
  resetDetection() {
1823
+ const currentCaptureState = this.stateManager.getCaptureState();
1824
+ const wasVideoActive = currentCaptureState.isVideoActive;
1823
1825
  this.stateManager.reset();
1826
+ if (wasVideoActive) {
1827
+ this.stateManager.updateCaptureState({ isVideoActive: true });
1828
+ }
1824
1829
  this.hasScreenshotTaken = false;
1825
1830
  this.startTime = Date.now();
1826
1831
  this.frameSkipCounter = 0;
@@ -1832,8 +1837,7 @@ const JaakStamps = class {
1832
1837
  clearTimeout(this.alignmentTimer);
1833
1838
  this.alignmentTimer = undefined;
1834
1839
  }
1835
- const captureState = this.stateManager.getCaptureState();
1836
- if (captureState.isVideoActive && this.detectionService.isModelLoaded()) {
1840
+ if (wasVideoActive && this.detectionService.isModelLoaded()) {
1837
1841
  this.updateStatus('Captura reiniciada', 'Buscando documento en el marco de captura', 'active');
1838
1842
  this.detectFrame();
1839
1843
  }
@@ -1847,6 +1851,7 @@ const JaakStamps = class {
1847
1851
  this.videoStream = undefined;
1848
1852
  this.stateManager.updateCaptureState({ isVideoActive: false, isLoading: false });
1849
1853
  }
1854
+ this.isMaskReady = false;
1850
1855
  this.updateStatus('Sesión finalizada', '', 'ready');
1851
1856
  this.detectionBoxes = [];
1852
1857
  this.cleanup();