@ekyc_qoobiss/qbs-ect-cmp 3.6.4 → 3.6.5

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.
@@ -5236,7 +5236,7 @@ class Stream {
5236
5236
  setVerificationFinished(fun) {
5237
5237
  this.verificationFinished = fun;
5238
5238
  }
5239
- constructor(_modelPath) {
5239
+ constructor() {
5240
5240
  this.streamPaused = false;
5241
5241
  this.recordedChunks = [];
5242
5242
  this.videoSize = { width: 0, height: 0 };
@@ -5250,9 +5250,9 @@ class Stream {
5250
5250
  this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
5251
5251
  this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
5252
5252
  }
5253
- static getInstance(modelPath) {
5253
+ static getInstance() {
5254
5254
  if (!Stream.instance) {
5255
- Stream.instance = new Stream(modelPath);
5255
+ Stream.instance = new Stream();
5256
5256
  }
5257
5257
  return Stream.instance;
5258
5258
  }
@@ -5302,6 +5302,7 @@ class Stream {
5302
5302
  async initStream(stream) {
5303
5303
  this.startStream(stream);
5304
5304
  this.recordStream();
5305
+ console.log('Stream initialized');
5305
5306
  }
5306
5307
  async resumeStream() {
5307
5308
  this.streamPaused = false;
@@ -5311,6 +5312,8 @@ class Stream {
5311
5312
  // if (this.faceDetection) await Detector.getInstance().startDetector();
5312
5313
  }
5313
5314
  recordStream() {
5315
+ if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
5316
+ return;
5314
5317
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
5315
5318
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
5316
5319
  if (state.device.mobileOS == MobileOS.iOS || state.device.browser == Browser.Safari)
@@ -5477,8 +5480,6 @@ const Camera = class {
5477
5480
  return (index.h("div", { class: "camera" }, index.h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), index.h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
5478
5481
  }
5479
5482
  startStream() {
5480
- if (!Stream.instance)
5481
- Stream.getInstance(this.modelPath);
5482
5483
  const stream = Stream.getInstance();
5483
5484
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
5484
5485
  if (this.captureMode == 'selfie') {
@@ -6458,7 +6459,7 @@ function v4(options, buf, offset) {
6458
6459
  }
6459
6460
 
6460
6461
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6461
- const version$1 = "3.6.4";
6462
+ const version$1 = "3.6.5";
6462
6463
  const description = "Person Identification Component";
6463
6464
  const main = "./dist/index.cjs.js";
6464
6465
  const module$1 = "./dist/index.js";
@@ -58,8 +58,6 @@ export class Camera {
58
58
  return (h("div", { class: "camera" }, h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
59
59
  }
60
60
  startStream() {
61
- if (!Stream.instance)
62
- Stream.getInstance(this.modelPath);
63
61
  const stream = Stream.getInstance();
64
62
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
65
63
  if (this.captureMode == 'selfie') {
@@ -46,7 +46,7 @@ export class Stream {
46
46
  setVerificationFinished(fun) {
47
47
  this.verificationFinished = fun;
48
48
  }
49
- constructor(_modelPath) {
49
+ constructor() {
50
50
  this.streamPaused = false;
51
51
  this.recordedChunks = [];
52
52
  this.videoSize = { width: 0, height: 0 };
@@ -60,9 +60,9 @@ export class Stream {
60
60
  this.idML5Detector = IDML5Detector.getInstance(this, store.device.isMobile);
61
61
  this.faceML5Detector = FaceML5Detector.getInstance(this, store.device.isMobile);
62
62
  }
63
- static getInstance(modelPath) {
63
+ static getInstance() {
64
64
  if (!Stream.instance) {
65
- Stream.instance = new Stream(modelPath);
65
+ Stream.instance = new Stream();
66
66
  }
67
67
  return Stream.instance;
68
68
  }
@@ -112,6 +112,7 @@ export class Stream {
112
112
  async initStream(stream) {
113
113
  this.startStream(stream);
114
114
  this.recordStream();
115
+ console.log('Stream initialized');
115
116
  }
116
117
  async resumeStream() {
117
118
  this.streamPaused = false;
@@ -121,6 +122,8 @@ export class Stream {
121
122
  // if (this.faceDetection) await Detector.getInstance().startDetector();
122
123
  }
123
124
  recordStream() {
125
+ if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
126
+ return;
124
127
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
125
128
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
126
129
  if (store.device.mobileOS == MobileOS.iOS || store.device.browser == Browser.Safari)
@@ -5232,7 +5232,7 @@ class Stream {
5232
5232
  setVerificationFinished(fun) {
5233
5233
  this.verificationFinished = fun;
5234
5234
  }
5235
- constructor(_modelPath) {
5235
+ constructor() {
5236
5236
  this.streamPaused = false;
5237
5237
  this.recordedChunks = [];
5238
5238
  this.videoSize = { width: 0, height: 0 };
@@ -5246,9 +5246,9 @@ class Stream {
5246
5246
  this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
5247
5247
  this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
5248
5248
  }
5249
- static getInstance(modelPath) {
5249
+ static getInstance() {
5250
5250
  if (!Stream.instance) {
5251
- Stream.instance = new Stream(modelPath);
5251
+ Stream.instance = new Stream();
5252
5252
  }
5253
5253
  return Stream.instance;
5254
5254
  }
@@ -5298,6 +5298,7 @@ class Stream {
5298
5298
  async initStream(stream) {
5299
5299
  this.startStream(stream);
5300
5300
  this.recordStream();
5301
+ console.log('Stream initialized');
5301
5302
  }
5302
5303
  async resumeStream() {
5303
5304
  this.streamPaused = false;
@@ -5307,6 +5308,8 @@ class Stream {
5307
5308
  // if (this.faceDetection) await Detector.getInstance().startDetector();
5308
5309
  }
5309
5310
  recordStream() {
5311
+ if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
5312
+ return;
5310
5313
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
5311
5314
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
5312
5315
  if (state.device.mobileOS == MobileOS.iOS || state.device.browser == Browser.Safari)
@@ -5473,8 +5476,6 @@ const Camera = class {
5473
5476
  return (h("div", { class: "camera" }, h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
5474
5477
  }
5475
5478
  startStream() {
5476
- if (!Stream.instance)
5477
- Stream.getInstance(this.modelPath);
5478
5479
  const stream = Stream.getInstance();
5479
5480
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
5480
5481
  if (this.captureMode == 'selfie') {
@@ -6454,7 +6455,7 @@ function v4(options, buf, offset) {
6454
6455
  }
6455
6456
 
6456
6457
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6457
- const version$1 = "3.6.4";
6458
+ const version$1 = "3.6.5";
6458
6459
  const description = "Person Identification Component";
6459
6460
  const main = "./dist/index.cjs.js";
6460
6461
  const module = "./dist/index.js";