@newtonschool/react_proctoring_library 0.0.88 → 0.0.90

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.
@@ -79,17 +79,15 @@ function ElectronScreenShare(_ref) {
79
79
  streamId: newStreamId
80
80
  });
81
81
  };
82
- const isRecurring = config === null || config === void 0 ? void 0 : config.recurring;
83
82
  const screenShareConfig = config === null || config === void 0 ? void 0 : (_config$fileUploadCon = config.fileUploadConfig) === null || _config$fileUploadCon === void 0 ? void 0 : _config$fileUploadCon.screenShare;
84
83
  (0, _react.useEffect)(() => {
85
- console.log('streamDeviceId', streamDeviceId);
86
- if (streamDeviceId && screenShareConfig && isRecurring) {
84
+ if (streamDeviceId && screenShareConfig) {
87
85
  const snapshotIntervalID = startScreenShareSnapshot(streamDeviceId);
88
86
  return () => {
89
87
  endScreenShareSnapshot(snapshotIntervalID);
90
88
  };
91
89
  }
92
- }, [streamDeviceId, isRecurring, screenShareConfig]);
90
+ }, [streamDeviceId, screenShareConfig]);
93
91
  (0, _react.useEffect)(() => {
94
92
  const permissionSetter = permission => {
95
93
  setScreensharePermission(permission);
@@ -36,7 +36,7 @@ function WebScreenShare(_ref) {
36
36
  streamSetter,
37
37
  permissions
38
38
  } = (0, _react.useContext)(proctoredContext);
39
- const recurringFetchIntervalRef = (0, _react.useRef)();
39
+ const recurringFetchIntervalRef = (0, _react.useRef)(null);
40
40
  const {
41
41
  recurring = false,
42
42
  recurringFetchInterval = 0
@@ -74,7 +74,9 @@ function WebScreenShare(_ref) {
74
74
  }, randomStartDelay);
75
75
  }
76
76
  return () => {
77
- clearInterval(recurringFetchIntervalRef.current);
77
+ if (recurringFetchIntervalRef.current) {
78
+ clearInterval(recurringFetchIntervalRef.current);
79
+ }
78
80
  clearTimeout(timeoutId);
79
81
  };
80
82
  }, [recurring, recurringFetchInterval, sendScreengrab]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtonschool/react_proctoring_library",
3
- "version": "0.0.88",
3
+ "version": "0.0.90",
4
4
  "description": "Used to proctor online tests",
5
5
  "author": "ayushkagrawal,shreyachandra,weastel",
6
6
  "main": "dist/index.js",