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.
@@ -3087,7 +3087,7 @@
3087
3087
  }();
3088
3088
  Browser.type = 'languageDetector';
3089
3089
 
3090
- var webSdkVersion = '0.0.78';
3090
+ var webSdkVersion = '0.0.79';
3091
3091
 
3092
3092
  function getPlatform() {
3093
3093
  return window.platform;
@@ -5105,21 +5105,23 @@
5105
5105
  if (!stream) {
5106
5106
  throw new Error('failed to open camera');
5107
5107
  }
5108
- stream.getVideoTracks()[0].onended = function () {
5109
- var _a;
5110
- if (iphoneContinuityCameraAvailable && iphoneContinuityCameraAllowed) {
5111
- console.log('someone unplugged the continuity camera');
5112
- setIphoneContinuityCameraAvailable(false);
5113
- setIphoneContinuityCameraDenied(true);
5114
- } else {
5115
- console.log('someone unplugged the webcam');
5116
- (_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.release();
5117
- cameraRef.current = null;
5118
- setVideoLoaded(false);
5119
- setCameraAccessDenied(true);
5120
- setCaptureDevice(null);
5121
- }
5122
- };
5108
+ stream.getVideoTracks().forEach(function (track) {
5109
+ track.onended = function () {
5110
+ var _a;
5111
+ if (iphoneContinuityCameraAvailable && iphoneContinuityCameraAllowed) {
5112
+ console.log('someone unplugged the continuity camera');
5113
+ setIphoneContinuityCameraAvailable(false);
5114
+ setIphoneContinuityCameraDenied(true);
5115
+ } else {
5116
+ console.log('someone unplugged the webcam');
5117
+ (_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.release();
5118
+ cameraRef.current = null;
5119
+ setVideoLoaded(false);
5120
+ setCameraAccessDenied(true);
5121
+ setCaptureDevice(null);
5122
+ }
5123
+ };
5124
+ });
5123
5125
  cameraRef.current = obtainCameraAccess(stream, videoDevice.label, videoRef.current);
5124
5126
  return [2];
5125
5127
  }