@newtonschool/react_proctoring_library 0.0.109 → 0.0.110

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.
@@ -42,8 +42,18 @@ const OpenHeimdall = _ref => {
42
42
  (0, _react.useEffect)(() => {
43
43
  setAskPermissionAction(oldAskPermissionAction => _objectSpread(_objectSpread({}, oldAskPermissionAction), {}, {
44
44
  openHeimdall: async () => {
45
- await window.electron.actions.openHeimdall();
46
- window.electron.actions.sendFileUploadConfig(config.fileUploadConfig);
45
+ const streams = await window.electron.streams.getScreenStream();
46
+ if (streams.length > 1) {
47
+ setPermissionErrors(oldErrors => _objectSpread(_objectSpread({}, oldErrors), {}, {
48
+ openHeimdall: 'Multiple Screens found. Please use only one during proctoring'
49
+ }));
50
+ } else {
51
+ await window.electron.actions.openHeimdall();
52
+ window.electron.actions.sendFileUploadConfig(config.fileUploadConfig);
53
+ setPermissionErrors(oldErrors => _objectSpread(_objectSpread({}, oldErrors), {}, {
54
+ openHeimdall: null
55
+ }));
56
+ }
47
57
  },
48
58
  downloadHeimdall: async () => {
49
59
  if (downloadHeimdallUrl.current) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtonschool/react_proctoring_library",
3
- "version": "0.0.109",
3
+ "version": "0.0.110",
4
4
  "description": "Used to proctor online tests",
5
5
  "author": "ayushkagrawal,shreyachandra,weastel",
6
6
  "main": "dist/index.js",