idmission-web-sdk 0.0.78 → 0.0.79

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.
@@ -50,7 +50,7 @@ var tf__namespace = /*#__PURE__*/_interopNamespace(tf);
50
50
  var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
51
51
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
52
52
 
53
- var webSdkVersion = '0.0.78';
53
+ var webSdkVersion = '0.0.79';
54
54
 
55
55
  function getPlatform() {
56
56
  return window.platform;
@@ -1478,21 +1478,23 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
1478
1478
  if (!stream) {
1479
1479
  throw new Error('failed to open camera');
1480
1480
  }
1481
- stream.getVideoTracks()[0].onended = function () {
1482
- var _a;
1483
- if (iphoneContinuityCameraAvailable && iphoneContinuityCameraAllowed) {
1484
- console.log('someone unplugged the continuity camera');
1485
- setIphoneContinuityCameraAvailable(false);
1486
- setIphoneContinuityCameraDenied(true);
1487
- } else {
1488
- console.log('someone unplugged the webcam');
1489
- (_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.release();
1490
- cameraRef.current = null;
1491
- setVideoLoaded(false);
1492
- setCameraAccessDenied(true);
1493
- setCaptureDevice(null);
1494
- }
1495
- };
1481
+ stream.getVideoTracks().forEach(function (track) {
1482
+ track.onended = function () {
1483
+ var _a;
1484
+ if (iphoneContinuityCameraAvailable && iphoneContinuityCameraAllowed) {
1485
+ console.log('someone unplugged the continuity camera');
1486
+ setIphoneContinuityCameraAvailable(false);
1487
+ setIphoneContinuityCameraDenied(true);
1488
+ } else {
1489
+ console.log('someone unplugged the webcam');
1490
+ (_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.release();
1491
+ cameraRef.current = null;
1492
+ setVideoLoaded(false);
1493
+ setCameraAccessDenied(true);
1494
+ setCaptureDevice(null);
1495
+ }
1496
+ };
1497
+ });
1496
1498
  cameraRef.current = obtainCameraAccess(stream, videoDevice.label, videoRef.current);
1497
1499
  return [2];
1498
1500
  }