@newtonschool/react_proctoring_library 0.0.114 → 0.0.116
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.
|
@@ -29,33 +29,37 @@ const OpenHeimdall = _ref => {
|
|
|
29
29
|
setShouldShowDownloadHeimdallButton,
|
|
30
30
|
setIsHeimdallSuccessfullyInstalledByScript
|
|
31
31
|
} = (0, _react.useContext)(proctoredContext);
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
var _window$electron$acti;
|
|
34
|
+
(_window$electron$acti = window.electron.actions) === null || _window$electron$acti === void 0 ? void 0 : _window$electron$acti.sendFileUploadConfig(config.fileUploadConfig);
|
|
35
|
+
}, [config]);
|
|
32
36
|
(0, _react.useEffect)(() => {
|
|
33
37
|
if (endTimeStamp) {
|
|
34
|
-
var _window$electron$
|
|
35
|
-
(_window$electron$
|
|
38
|
+
var _window$electron$acti2;
|
|
39
|
+
(_window$electron$acti2 = window.electron.actions) === null || _window$electron$acti2 === void 0 ? void 0 : _window$electron$acti2.sendExamMappingDetails({
|
|
36
40
|
endTimeStamp
|
|
37
41
|
});
|
|
38
42
|
}
|
|
39
43
|
}, [endTimeStamp]);
|
|
40
44
|
(0, _react.useEffect)(() => {
|
|
41
|
-
var _window$electron$
|
|
45
|
+
var _window$electron$acti6;
|
|
42
46
|
setAskPermissionAction(oldAskPermissionAction => _objectSpread(_objectSpread({}, oldAskPermissionAction), {}, {
|
|
43
47
|
openHeimdall: async () => {
|
|
44
|
-
var _window$electron$
|
|
45
|
-
await ((_window$electron$
|
|
46
|
-
(_window$electron$
|
|
48
|
+
var _window$electron$acti3, _window$electron$acti4;
|
|
49
|
+
await ((_window$electron$acti3 = window.electron.actions) === null || _window$electron$acti3 === void 0 ? void 0 : _window$electron$acti3.openHeimdall());
|
|
50
|
+
(_window$electron$acti4 = window.electron.actions) === null || _window$electron$acti4 === void 0 ? void 0 : _window$electron$acti4.sendFileUploadConfig(config.fileUploadConfig);
|
|
47
51
|
},
|
|
48
52
|
downloadHeimdall: async () => {
|
|
49
53
|
if (downloadHeimdallUrl.current) {
|
|
50
|
-
var _window$electron$
|
|
51
|
-
const res = await ((_window$electron$
|
|
54
|
+
var _window$electron$acti5;
|
|
55
|
+
const res = await ((_window$electron$acti5 = window.electron.actions) === null || _window$electron$acti5 === void 0 ? void 0 : _window$electron$acti5.downloadHeimdall(downloadHeimdallUrl.current));
|
|
52
56
|
if (res.success) {
|
|
53
57
|
setIsHeimdallSuccessfullyInstalledByScript(true);
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
}));
|
|
58
|
-
(_window$electron$
|
|
62
|
+
(_window$electron$acti6 = window.electron.actions) === null || _window$electron$acti6 === void 0 ? void 0 : _window$electron$acti6.onHeimdallStatusChange(status => {
|
|
59
63
|
try {
|
|
60
64
|
permissionSetter.setOpenHeimdallAppPermission(status);
|
|
61
65
|
setPermissionErrors(oldErrors => _objectSpread(_objectSpread({}, oldErrors), {}, {
|
|
@@ -27,10 +27,10 @@ const getMacBookDevice = function getMacBookDevice() {
|
|
|
27
27
|
if (!devices) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return
|
|
30
|
+
// supports Apple Silicon macbook camera only
|
|
31
|
+
const macbookCamera = devices.find(device => device.label.includes('MacBook Pro Camera') || device.label.includes('MacBook Air Camera'));
|
|
32
|
+
console.log('macbookCamera label', macbookCamera.label);
|
|
33
|
+
return macbookCamera;
|
|
34
34
|
};
|
|
35
35
|
function ElectronWebCam(_ref) {
|
|
36
36
|
let {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newtonschool/react_proctoring_library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.116",
|
|
4
4
|
"description": "Used to proctor online tests",
|
|
5
5
|
"author": "ayushkagrawal,shreyachandra,weastel",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
".": "./dist/index.js",
|
|
58
58
|
"./useCleanupPermissions": "./dist/useCleanupPermissions.js"
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
}
|