@newtonschool/react_proctoring_library 0.0.56 → 0.0.58
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.
- package/dist/components/proctor-app/Loadable.js +2 -3
- package/dist/components/proctor-app/index.js +3 -4
- package/dist/components/proctor-app/index.scss +10 -3
- package/dist/components/proctor-context-app/Loadable.js +2 -3
- package/dist/components/proctor-context-app/index.js +3 -4
- package/dist/components/screenshare-activity-tracker/index.js +2 -3
- package/dist/components/webcam-activity-tracker/index.js +1 -2
- package/dist/constants/defaults.js +7 -14
- package/dist/constants/dom.js +2 -4
- package/dist/constants/text.js +27 -54
- package/dist/hooks/useWebcamData.js +2 -2
- package/dist/utils/breachUtils.js +2 -2
- package/dist/utils/loadable.js +1 -2
- package/dist/utils/webcamMicrophoneUtils.js +2 -4
- package/package.json +1 -1
|
@@ -14,7 +14,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /**
|
|
15
15
|
* Asynchronously loads the component for FeaturePage
|
|
16
16
|
*/
|
|
17
|
-
var _default = (0, _loadable.default)(() => Promise.resolve().then(() => _interopRequireWildcard(require("./index"))), {
|
|
17
|
+
var _default = exports.default = (0, _loadable.default)(() => Promise.resolve().then(() => _interopRequireWildcard(require("./index"))), {
|
|
18
18
|
fallback: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null)
|
|
19
|
-
});
|
|
20
|
-
exports.default = _default;
|
|
19
|
+
});
|
|
@@ -28,8 +28,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
28
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
29
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
30
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
-
function ownKeys(
|
|
32
|
-
function _objectSpread(
|
|
31
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33
33
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
34
34
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
35
35
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -149,5 +149,4 @@ const ProctorApp = _ref => {
|
|
|
149
149
|
}));
|
|
150
150
|
};
|
|
151
151
|
exports.ProctorApp = ProctorApp;
|
|
152
|
-
var _default = ProctorApp;
|
|
153
|
-
exports.default = _default;
|
|
152
|
+
var _default = exports.default = ProctorApp;
|
|
@@ -3,17 +3,24 @@
|
|
|
3
3
|
-ms-user-select: none;
|
|
4
4
|
user-select: none;
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
.fullwidth {
|
|
7
8
|
width: 100%;
|
|
8
9
|
}
|
|
10
|
+
|
|
9
11
|
.fullheight {
|
|
10
12
|
height: 100%;
|
|
11
13
|
overflow-y: scroll;
|
|
12
14
|
}
|
|
15
|
+
|
|
13
16
|
.captured-video-canvas {
|
|
14
17
|
position: absolute;
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
top: 0px;
|
|
19
|
+
left: 0px;
|
|
20
|
+
height: 100vh;
|
|
21
|
+
width: 100vw;
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
.hide {
|
|
18
25
|
visibility: hidden;
|
|
19
|
-
}
|
|
26
|
+
}
|
|
@@ -14,7 +14,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /**
|
|
15
15
|
* Asynchronously loads the component for FeaturePage
|
|
16
16
|
*/
|
|
17
|
-
var _default = (0, _loadable.default)(() => Promise.resolve().then(() => _interopRequireWildcard(require("./index"))), {
|
|
17
|
+
var _default = exports.default = (0, _loadable.default)(() => Promise.resolve().then(() => _interopRequireWildcard(require("./index"))), {
|
|
18
18
|
fallback: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null)
|
|
19
|
-
});
|
|
20
|
-
exports.default = _default;
|
|
19
|
+
});
|
|
@@ -13,8 +13,8 @@ var _webcamMicrophoneUtils = require("../../utils/webcamMicrophoneUtils");
|
|
|
13
13
|
var _defaults = require("../../constants/defaults");
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function ownKeys(
|
|
17
|
-
function _objectSpread(
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
18
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20
20
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -85,5 +85,4 @@ const ProctoredContextApp = _ref => {
|
|
|
85
85
|
})
|
|
86
86
|
}, children);
|
|
87
87
|
};
|
|
88
|
-
var _default = ProctoredContextApp;
|
|
89
|
-
exports.default = _default;
|
|
88
|
+
var _default = exports.default = ProctoredContextApp;
|
|
@@ -11,7 +11,7 @@ var _dom = require("../../constants/dom");
|
|
|
11
11
|
var _webcamMicrophoneUtils = require("../../utils/webcamMicrophoneUtils");
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
const ScreenshareActivityTracker = /*#__PURE__*/(0, _react.forwardRef)((_ref, screenshareReference) => {
|
|
14
|
+
const ScreenshareActivityTracker = exports.ScreenshareActivityTracker = /*#__PURE__*/(0, _react.forwardRef)((_ref, screenshareReference) => {
|
|
15
15
|
let {
|
|
16
16
|
screenshareStream
|
|
17
17
|
} = _ref;
|
|
@@ -25,5 +25,4 @@ const ScreenshareActivityTracker = /*#__PURE__*/(0, _react.forwardRef)((_ref, sc
|
|
|
25
25
|
className: "captured-video-canvas hide",
|
|
26
26
|
id: _dom.SCREENSHARE_REFERENCE_ID
|
|
27
27
|
});
|
|
28
|
-
});
|
|
29
|
-
exports.ScreenshareActivityTracker = ScreenshareActivityTracker;
|
|
28
|
+
});
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.proctorParamsToPermission = exports.initialValues = exports.gpuTypes = exports.evaluateVideoIntervalInSeconds = exports.defaultConfig = exports.STATS_PARAMS = exports.INITIAL_STATISTICS = void 0;
|
|
7
|
-
const defaultConfig = {
|
|
7
|
+
const defaultConfig = exports.defaultConfig = {
|
|
8
8
|
people: true,
|
|
9
9
|
tabSwitch: true,
|
|
10
10
|
fullscreenExit: true,
|
|
@@ -14,8 +14,7 @@ const defaultConfig = {
|
|
|
14
14
|
copyPasteProctoring: true,
|
|
15
15
|
pageFocus: true
|
|
16
16
|
};
|
|
17
|
-
exports.
|
|
18
|
-
const initialValues = {
|
|
17
|
+
const initialValues = exports.initialValues = {
|
|
19
18
|
isTabSwitched: false,
|
|
20
19
|
pageFocus: true,
|
|
21
20
|
userCount: 0,
|
|
@@ -26,8 +25,7 @@ const initialValues = {
|
|
|
26
25
|
lookedAwayCount: 0,
|
|
27
26
|
firstTimeFullScreen: true
|
|
28
27
|
};
|
|
29
|
-
exports.
|
|
30
|
-
const STATS_PARAMS = {
|
|
28
|
+
const STATS_PARAMS = exports.STATS_PARAMS = {
|
|
31
29
|
isTabSwitched: 'IS_TAB_SWITCHED',
|
|
32
30
|
isPageFocussed: 'PAGE_FOCUS',
|
|
33
31
|
isFullscreen: 'IS_FULLSCREEN',
|
|
@@ -35,23 +33,18 @@ const STATS_PARAMS = {
|
|
|
35
33
|
userCountMax: 'USER_COUNT_MAX',
|
|
36
34
|
isWebcamNotReliable: 'IS_WEBCAM_DATA_NOT_RELIABLE'
|
|
37
35
|
};
|
|
38
|
-
exports.
|
|
39
|
-
const INITIAL_STATISTICS = {
|
|
36
|
+
const INITIAL_STATISTICS = exports.INITIAL_STATISTICS = {
|
|
40
37
|
[STATS_PARAMS.isTabSwitched]: initialValues.isTabSwitched,
|
|
41
38
|
[STATS_PARAMS.isFullscreen]: initialValues.isFullscreen,
|
|
42
39
|
[STATS_PARAMS.lookedAwayCount]: initialValues.lookedAwayCount,
|
|
43
40
|
[STATS_PARAMS.userCountMax]: initialValues.userCount,
|
|
44
41
|
[STATS_PARAMS.isWebcamNotReliable]: initialValues.isWebcamDataNotReliable
|
|
45
42
|
};
|
|
46
|
-
exports.
|
|
47
|
-
const proctorParamsToPermission = {
|
|
43
|
+
const proctorParamsToPermission = exports.proctorParamsToPermission = {
|
|
48
44
|
fullscreenExit: 'fullscreen',
|
|
49
45
|
lookedAway: 'video',
|
|
50
46
|
webcamSnapshots: 'video',
|
|
51
47
|
screenshareSnapshots: 'screenshare'
|
|
52
48
|
};
|
|
53
|
-
exports.
|
|
54
|
-
const
|
|
55
|
-
exports.evaluateVideoIntervalInSeconds = evaluateVideoIntervalInSeconds;
|
|
56
|
-
const gpuTypes = ['intel', 'apple', 'amd', 'radeon', 'nvidia', 'geforce'];
|
|
57
|
-
exports.gpuTypes = gpuTypes;
|
|
49
|
+
const evaluateVideoIntervalInSeconds = exports.evaluateVideoIntervalInSeconds = 5;
|
|
50
|
+
const gpuTypes = exports.gpuTypes = ['intel', 'apple', 'amd', 'radeon', 'nvidia', 'geforce'];
|
package/dist/constants/dom.js
CHANGED
|
@@ -4,7 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.WEBCAM_REFERENCE_ID = exports.SCREENSHARE_REFERENCE_ID = void 0;
|
|
7
|
-
const WEBCAM_REFERENCE_ID = "wc-ref";
|
|
8
|
-
exports.
|
|
9
|
-
const SCREENSHARE_REFERENCE_ID = "ss-ref";
|
|
10
|
-
exports.SCREENSHARE_REFERENCE_ID = SCREENSHARE_REFERENCE_ID;
|
|
7
|
+
const WEBCAM_REFERENCE_ID = exports.WEBCAM_REFERENCE_ID = "wc-ref";
|
|
8
|
+
const SCREENSHARE_REFERENCE_ID = exports.SCREENSHARE_REFERENCE_ID = "ss-ref";
|
package/dist/constants/text.js
CHANGED
|
@@ -4,57 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.WATCHING_SCREEN = exports.VIDEO_UNSUPPORTED_IN_BROWSER = exports.USER_COUNT_LABEL = exports.REQUEST_VIDEO_AUDIO_PERMISSIONS_HEADING = exports.REQUEST_VIDEO_AUDIO_PERMISSIONS_DESC = exports.REQUEST_PERMISSION = exports.PERMISSION_VIDEO = exports.PERMISSION_TITLE = exports.PERMISSION_SCREENSHARE = exports.PERMISSION_GENERIC = exports.PERMISSION_FULLSCREEN = exports.PERMISSION_AUDIO_VIDEO = exports.PERMISSION_AUDIO = exports.NO_CAMERA_AVAILABLE = exports.NO_AUDIO_DEVICE_AVAILABLE = exports.NOT_WATCHING_SCREEN = exports.MESSAGE = exports.FULLSCREEN_ERROR_MESSAGE = exports.DENY_FULLSCREEN = exports.CAMERA_UNAVAILABLE_INSECURE_CONN = exports.BROWSER_BLOCKED_PERMISSION_RESOLVED_RECHECK = exports.BROWSER_BLOCKED_PERMISSION_NEXT_STEP = exports.BROWSER_BLOCKED_PERMISSION_DIRECTION = exports.BROWSER_BLOCKED_PERMISSION_DIALOG = exports.BROWSER_BLOCKED_PERMISSION = exports.ALLOW_SCREENSHARE = exports.ALLOW_FULLSCREEN = void 0;
|
|
7
|
-
const WATCHING_SCREEN = "You are watching the screen";
|
|
8
|
-
exports.
|
|
9
|
-
const
|
|
10
|
-
exports.
|
|
11
|
-
const
|
|
12
|
-
exports.
|
|
13
|
-
const
|
|
14
|
-
exports.
|
|
15
|
-
const
|
|
16
|
-
exports.
|
|
17
|
-
const
|
|
18
|
-
exports.
|
|
19
|
-
const
|
|
20
|
-
exports.
|
|
21
|
-
const
|
|
22
|
-
exports.
|
|
23
|
-
const
|
|
24
|
-
exports.
|
|
25
|
-
const
|
|
26
|
-
exports.
|
|
27
|
-
const
|
|
28
|
-
exports.
|
|
29
|
-
const
|
|
30
|
-
exports.
|
|
31
|
-
const
|
|
32
|
-
exports.
|
|
33
|
-
const
|
|
34
|
-
exports.BROWSER_BLOCKED_PERMISSION = BROWSER_BLOCKED_PERMISSION;
|
|
35
|
-
const REQUEST_VIDEO_AUDIO_PERMISSIONS_HEADING = "To access this page, you will need to give us video and audio permissions";
|
|
36
|
-
exports.REQUEST_VIDEO_AUDIO_PERMISSIONS_HEADING = REQUEST_VIDEO_AUDIO_PERMISSIONS_HEADING;
|
|
37
|
-
const REQUEST_VIDEO_AUDIO_PERMISSIONS_DESC = "Without these permissions, you won't be able to access the screen";
|
|
38
|
-
exports.REQUEST_VIDEO_AUDIO_PERMISSIONS_DESC = REQUEST_VIDEO_AUDIO_PERMISSIONS_DESC;
|
|
39
|
-
const REQUEST_PERMISSION = "Request Permission";
|
|
40
|
-
exports.REQUEST_PERMISSION = REQUEST_PERMISSION;
|
|
41
|
-
const BROWSER_BLOCKED_PERMISSION_DIRECTION = "Somewhere near right corner of url bar you will find icon like below, please click it.";
|
|
42
|
-
exports.BROWSER_BLOCKED_PERMISSION_DIRECTION = BROWSER_BLOCKED_PERMISSION_DIRECTION;
|
|
43
|
-
const BROWSER_BLOCKED_PERMISSION_DIALOG = "It will open dialog box like the one shown below, please allow us the permissions.";
|
|
44
|
-
exports.BROWSER_BLOCKED_PERMISSION_DIALOG = BROWSER_BLOCKED_PERMISSION_DIALOG;
|
|
45
|
-
const BROWSER_BLOCKED_PERMISSION_NEXT_STEP = "Click on the button below, after completing above steps.";
|
|
46
|
-
exports.BROWSER_BLOCKED_PERMISSION_NEXT_STEP = BROWSER_BLOCKED_PERMISSION_NEXT_STEP;
|
|
47
|
-
const BROWSER_BLOCKED_PERMISSION_RESOLVED_RECHECK = "I've given permission, Check Again";
|
|
48
|
-
exports.BROWSER_BLOCKED_PERMISSION_RESOLVED_RECHECK = BROWSER_BLOCKED_PERMISSION_RESOLVED_RECHECK;
|
|
49
|
-
const PERMISSION_GENERIC = "This screen requires following permissions for continuous access. Without these permissions, you won't be able to access the screen.";
|
|
50
|
-
exports.PERMISSION_GENERIC = PERMISSION_GENERIC;
|
|
51
|
-
const PERMISSION_FULLSCREEN = "Please allow us to switch your screen to fullscreen mode.";
|
|
52
|
-
exports.PERMISSION_FULLSCREEN = PERMISSION_FULLSCREEN;
|
|
53
|
-
const PERMISSION_AUDIO_VIDEO = "Your browser or system settings have disallowed Microphone and Camera permissions. Please permit this website to access microphone and camera. Refresh after you've given the permission to access the screen";
|
|
54
|
-
exports.PERMISSION_AUDIO_VIDEO = PERMISSION_AUDIO_VIDEO;
|
|
55
|
-
const PERMISSION_VIDEO = "Your browser or system settings have disallowed Camera permissions. Please permit this website to access the camera. Refresh after you've given the permission to access the screen";
|
|
56
|
-
exports.PERMISSION_VIDEO = PERMISSION_VIDEO;
|
|
57
|
-
const PERMISSION_AUDIO = "Your browser or system settings have disallowed Microphone permissions. Please permit this website to access the microphone. Refresh after you've given the permission to access the screen";
|
|
58
|
-
exports.PERMISSION_AUDIO = PERMISSION_AUDIO;
|
|
59
|
-
const PERMISSION_SCREENSHARE = "Please share your entire screen";
|
|
60
|
-
exports.PERMISSION_SCREENSHARE = PERMISSION_SCREENSHARE;
|
|
7
|
+
const WATCHING_SCREEN = exports.WATCHING_SCREEN = "You are watching the screen";
|
|
8
|
+
const NOT_WATCHING_SCREEN = exports.NOT_WATCHING_SCREEN = "You are not watching the screen";
|
|
9
|
+
const USER_COUNT_LABEL = exports.USER_COUNT_LABEL = "User count";
|
|
10
|
+
const PERMISSION_TITLE = exports.PERMISSION_TITLE = "Permissions";
|
|
11
|
+
const MESSAGE = exports.MESSAGE = "This screen can only be accessed in fullscreen mode. Please allow us to switch your screen to fullscreen mode for continuous access of the screen.";
|
|
12
|
+
const FULLSCREEN_ERROR_MESSAGE = exports.FULLSCREEN_ERROR_MESSAGE = "This screen is only accessible in fullscreen mode";
|
|
13
|
+
const DENY_FULLSCREEN = exports.DENY_FULLSCREEN = "Deny";
|
|
14
|
+
const ALLOW_FULLSCREEN = exports.ALLOW_FULLSCREEN = "Switch to Fullscreen";
|
|
15
|
+
const ALLOW_SCREENSHARE = exports.ALLOW_SCREENSHARE = "Share Screen";
|
|
16
|
+
const NO_CAMERA_AVAILABLE = exports.NO_CAMERA_AVAILABLE = "No Camera available for use.";
|
|
17
|
+
const NO_AUDIO_DEVICE_AVAILABLE = exports.NO_AUDIO_DEVICE_AVAILABLE = "No audio device available for use";
|
|
18
|
+
const CAMERA_UNAVAILABLE_INSECURE_CONN = exports.CAMERA_UNAVAILABLE_INSECURE_CONN = "Camera can only be used in secure connection. Please check that you are in https mode";
|
|
19
|
+
const VIDEO_UNSUPPORTED_IN_BROWSER = exports.VIDEO_UNSUPPORTED_IN_BROWSER = "This page requires a browser, such as Google Chrome or Firefox, that supports the video tag.";
|
|
20
|
+
const BROWSER_BLOCKED_PERMISSION = exports.BROWSER_BLOCKED_PERMISSION = "It seems your browser is blocked from accessing your camera and microphone.";
|
|
21
|
+
const REQUEST_VIDEO_AUDIO_PERMISSIONS_HEADING = exports.REQUEST_VIDEO_AUDIO_PERMISSIONS_HEADING = "To access this page, you will need to give us video and audio permissions";
|
|
22
|
+
const REQUEST_VIDEO_AUDIO_PERMISSIONS_DESC = exports.REQUEST_VIDEO_AUDIO_PERMISSIONS_DESC = "Without these permissions, you won't be able to access the screen";
|
|
23
|
+
const REQUEST_PERMISSION = exports.REQUEST_PERMISSION = "Request Permission";
|
|
24
|
+
const BROWSER_BLOCKED_PERMISSION_DIRECTION = exports.BROWSER_BLOCKED_PERMISSION_DIRECTION = "Somewhere near right corner of url bar you will find icon like below, please click it.";
|
|
25
|
+
const BROWSER_BLOCKED_PERMISSION_DIALOG = exports.BROWSER_BLOCKED_PERMISSION_DIALOG = "It will open dialog box like the one shown below, please allow us the permissions.";
|
|
26
|
+
const BROWSER_BLOCKED_PERMISSION_NEXT_STEP = exports.BROWSER_BLOCKED_PERMISSION_NEXT_STEP = "Click on the button below, after completing above steps.";
|
|
27
|
+
const BROWSER_BLOCKED_PERMISSION_RESOLVED_RECHECK = exports.BROWSER_BLOCKED_PERMISSION_RESOLVED_RECHECK = "I've given permission, Check Again";
|
|
28
|
+
const PERMISSION_GENERIC = exports.PERMISSION_GENERIC = "This screen requires following permissions for continuous access. Without these permissions, you won't be able to access the screen.";
|
|
29
|
+
const PERMISSION_FULLSCREEN = exports.PERMISSION_FULLSCREEN = "Please allow us to switch your screen to fullscreen mode.";
|
|
30
|
+
const PERMISSION_AUDIO_VIDEO = exports.PERMISSION_AUDIO_VIDEO = "Your browser or system settings have disallowed Microphone and Camera permissions. Please permit this website to access microphone and camera. Refresh after you've given the permission to access the screen";
|
|
31
|
+
const PERMISSION_VIDEO = exports.PERMISSION_VIDEO = "Your browser or system settings have disallowed Camera permissions. Please permit this website to access the camera. Refresh after you've given the permission to access the screen";
|
|
32
|
+
const PERMISSION_AUDIO = exports.PERMISSION_AUDIO = "Your browser or system settings have disallowed Microphone permissions. Please permit this website to access the microphone. Refresh after you've given the permission to access the screen";
|
|
33
|
+
const PERMISSION_SCREENSHARE = exports.PERMISSION_SCREENSHARE = "Please share your entire screen";
|
|
@@ -19,7 +19,7 @@ const getUserCount = async (model, image) => {
|
|
|
19
19
|
let predictions = await model.detect(image);
|
|
20
20
|
let numOfUsers = 0;
|
|
21
21
|
predictions.forEach(prediction => {
|
|
22
|
-
if (prediction.class ===
|
|
22
|
+
if (prediction.class === 'person') {
|
|
23
23
|
numOfUsers += 1;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
@@ -59,7 +59,7 @@ function useWebcamData(webcamReference, canvasReference, proctorParams) {
|
|
|
59
59
|
};
|
|
60
60
|
loadCocoSSDModel();
|
|
61
61
|
}
|
|
62
|
-
}, [webcamReference, canvasReference, proctorParams.people, proctorParams.lookedAwayCount]);
|
|
62
|
+
}, [webcamReference, canvasReference, proctorParams.webcamSnapshots, proctorParams.people, proctorParams.lookedAwayCount]);
|
|
63
63
|
(0, _react.useEffect)(() => {
|
|
64
64
|
if (!isWatching) {
|
|
65
65
|
setLookedAwayCount(lookedAwayCount => lookedAwayCount + 1);
|
|
@@ -7,8 +7,8 @@ exports.showProctoredComponent = exports.isWebcamRequired = exports.isAudioRequi
|
|
|
7
7
|
require("core-js/modules/es.symbol.description.js");
|
|
8
8
|
var _defaults = require("../constants/defaults");
|
|
9
9
|
var _permission = require("./permission");
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
13
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
14
14
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
package/dist/utils/loadable.js
CHANGED
|
@@ -76,16 +76,14 @@ const getGlancePercentage = partSegmentation => {
|
|
|
76
76
|
return Math.ceil(avgPercentage);
|
|
77
77
|
};
|
|
78
78
|
exports.getGlancePercentage = getGlancePercentage;
|
|
79
|
-
const getVideoPermission = function getVideoPermission(stream) {
|
|
79
|
+
const getVideoPermission = exports.getVideoPermission = function getVideoPermission(stream) {
|
|
80
80
|
let exludeTrackId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
81
81
|
return stream.getVideoTracks().filter(track => track.enabled && track.label && track.id !== exludeTrackId).length > 0;
|
|
82
82
|
};
|
|
83
|
-
exports.
|
|
84
|
-
const getAudioPermission = function getAudioPermission(stream) {
|
|
83
|
+
const getAudioPermission = exports.getAudioPermission = function getAudioPermission(stream) {
|
|
85
84
|
let exludeTrackId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
86
85
|
return stream.getAudioTracks().filter(track => track.enabled && track.label && !track.muted && track.id !== exludeTrackId).length > 0;
|
|
87
86
|
};
|
|
88
|
-
exports.getAudioPermission = getAudioPermission;
|
|
89
87
|
const getAudioVideoPermission = stream => {
|
|
90
88
|
return {
|
|
91
89
|
audio: getAudioPermission(stream),
|