@newtonschool/react_proctoring_library 0.0.7 → 0.0.10
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/ProctorApp.js +12 -1
- package/dist/constants/defaults.js +4 -2
- package/dist/hooks/index.js +0 -8
- package/dist/hooks/useFullScreenData.js +1 -1
- package/dist/utils/gpuUtils.js +22 -0
- package/dist/utils/index.js +9 -1
- package/package.json +1 -1
- package/dist/assets/images/vid-micro-permissions-given.png +0 -0
- package/dist/assets/images/vid-micro-permissions.png +0 -0
- package/dist/assets/videos/give-permissions.mp4 +0 -0
- package/dist/components/FullScreenPermission.js +0 -84
- package/dist/components/FullScreenTestInWebcam.js +0 -61
- package/dist/components/ResponseModal.js +0 -71
- package/dist/components/full-screen-permission.scss +0 -8
- package/dist/components/permissions/audio-video-permission.js +0 -35
- package/dist/components/permissions/audio-video-permission.scss +0 -228
- package/dist/components/permissions/blocked-permission.js +0 -76
- package/dist/components/permissions/full-screen-permission.js +0 -43
- package/dist/components/permissions/full-screen-permission.scss +0 -8
- package/dist/components/permissions/initial-screen.js +0 -52
- package/dist/demo-code/README.md +0 -70
- package/dist/demo-code/package.json +0 -38
- package/dist/demo-code/public/favicon.ico +0 -0
- package/dist/demo-code/public/index.html +0 -43
- package/dist/demo-code/public/logo192.png +0 -0
- package/dist/demo-code/public/logo512.png +0 -0
- package/dist/demo-code/public/manifest.json +0 -25
- package/dist/demo-code/public/robots.txt +0 -3
- package/dist/demo-code/src/App.css +0 -38
- package/dist/demo-code/src/App.js +0 -29
- package/dist/demo-code/src/index.js +0 -11
- package/dist/hooks/useAudioVideoPermission.js +0 -96
- package/dist/hooks/useAudioVideoPermissions.js +0 -1
- package/dist/hooks/useFullScreenStatus.js +0 -45
- package/dist/lib/index.js +0 -19
- package/dist/utils/ValidityChecks.js +0 -1
- package/dist/utils/getBrowserDocumentProp.js +0 -31
- package/dist/utils/getGlancePercentage.js +0 -1
- package/dist/utils/getIsDocumentHidden.js +0 -14
- package/dist/utils/webcamUtils.js +0 -79
|
@@ -43,6 +43,7 @@ const ProctorApp = _ref => {
|
|
|
43
43
|
const webcamReference = (0, _react.useRef)(null);
|
|
44
44
|
const canvasReference = (0, _react.useRef)(null);
|
|
45
45
|
const statistics = (0, _react.useRef)(_defaults.INITIAL_STATISTICS);
|
|
46
|
+
const gpuAvailable = (0, _utils.isGPUAvailable)();
|
|
46
47
|
const [audioPermission, setAudioPermission] = (0, _react.useState)(false);
|
|
47
48
|
const [videoPermission, setVideoPermission] = (0, _react.useState)(false);
|
|
48
49
|
const firstFullScreenDone = (0, _react.useRef)(false);
|
|
@@ -51,8 +52,18 @@ const ProctorApp = _ref => {
|
|
|
51
52
|
setFullscreen,
|
|
52
53
|
fullScreenExitCount
|
|
53
54
|
} = (0, _hooks.useFullscreenData)(firstFullScreenDone);
|
|
54
|
-
const [userCount, lookedAwayCount] = (0, _useWebcamData.default)(webcamReference, canvasReference);
|
|
55
|
+
const [userCount, lookedAwayCount] = gpuAvailable ? (0, _useWebcamData.default)(webcamReference, canvasReference) : [-1, -1];
|
|
55
56
|
const tabSwitchCount = (0, _hooks.useTabSwitchCount)(firstFullScreenDone);
|
|
57
|
+
(0, _react.useEffect)(() => {
|
|
58
|
+
if (!gpuAvailable & shouldSendDataOnBreach) {
|
|
59
|
+
(0, _utils.sendDataOnBreach)(statistics, {
|
|
60
|
+
userCount,
|
|
61
|
+
tabSwitchCount,
|
|
62
|
+
fullScreenExitCount,
|
|
63
|
+
lookedAwayCount
|
|
64
|
+
}, proctoringIdentifier, sendData);
|
|
65
|
+
}
|
|
66
|
+
}, []);
|
|
56
67
|
(0, _react.useEffect)(() => {
|
|
57
68
|
(0, _utils.removeStatsFromLocalStorage)(proctoringIdentifier);
|
|
58
69
|
}, [proctoringIdentifier]);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.initialValues = exports.glancePercentageToPass = exports.evaluateVideoIntervalInSeconds = exports.bodyPixConfigs = exports.INITIAL_STATISTICS = void 0;
|
|
6
|
+
exports.initialValues = exports.gpuTypes = exports.glancePercentageToPass = exports.evaluateVideoIntervalInSeconds = exports.bodyPixConfigs = exports.INITIAL_STATISTICS = void 0;
|
|
7
7
|
const initialValues = {
|
|
8
8
|
tabSwitchCount: 0,
|
|
9
9
|
userCount: 0,
|
|
@@ -35,4 +35,6 @@ exports.bodyPixConfigs = bodyPixConfigs;
|
|
|
35
35
|
const glancePercentageToPass = 60;
|
|
36
36
|
exports.glancePercentageToPass = glancePercentageToPass;
|
|
37
37
|
const evaluateVideoIntervalInSeconds = 1;
|
|
38
|
-
exports.evaluateVideoIntervalInSeconds = evaluateVideoIntervalInSeconds;
|
|
38
|
+
exports.evaluateVideoIntervalInSeconds = evaluateVideoIntervalInSeconds;
|
|
39
|
+
const gpuTypes = ["apple", "amd", "radeon", "nvidia", "geforce"];
|
|
40
|
+
exports.gpuTypes = gpuTypes;
|
package/dist/hooks/index.js
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "useAudioVideoPermissions", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _useAudioVideoPermissions.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "useFullscreenData", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function get() {
|
|
@@ -34,6 +28,4 @@ var _usePageVisibility = _interopRequireDefault(require("./usePageVisibility"));
|
|
|
34
28
|
|
|
35
29
|
var _useTabSwitchCount = _interopRequireDefault(require("./useTabSwitchCount"));
|
|
36
30
|
|
|
37
|
-
var _useAudioVideoPermissions = _interopRequireDefault(require("./useAudioVideoPermissions"));
|
|
38
|
-
|
|
39
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -24,7 +24,7 @@ function useFullscreenData(firstFullScreenDone) {
|
|
|
24
24
|
setFullScreenExitCount(fullScreenExitCount => fullScreenExitCount + 1);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
if (!firstFullScreenDone.current) {
|
|
27
|
+
if (isFullscreen && !firstFullScreenDone.current) {
|
|
28
28
|
firstFullScreenDone.current = true;
|
|
29
29
|
}
|
|
30
30
|
}, [isFullscreen, firstFullScreenDone]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.includes.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.includes.js");
|
|
8
|
+
|
|
9
|
+
var _defaults = require("../constants/defaults");
|
|
10
|
+
|
|
11
|
+
const isGPUAvailable = () => {
|
|
12
|
+
const canvas = document.createElement("canvas");
|
|
13
|
+
const webgl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
|
|
14
|
+
const debugInfo = webgl.getExtension("webgl_debug_renderer_info");
|
|
15
|
+
const gpu = webgl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL).toLowerCase();
|
|
16
|
+
|
|
17
|
+
for (const gpuType of _defaults.gpuTypes) {
|
|
18
|
+
if (gpu.includes(gpuType)) return true;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return false;
|
|
22
|
+
};
|
package/dist/utils/index.js
CHANGED
|
@@ -63,6 +63,12 @@ Object.defineProperty(exports, "isArrayValid", {
|
|
|
63
63
|
return _arrayUtils.isArrayValid;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
+
Object.defineProperty(exports, "isGPUAvailable", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _gpuUtils.isGPUAvailable;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
66
72
|
Object.defineProperty(exports, "isWebcamVideoValid", {
|
|
67
73
|
enumerable: true,
|
|
68
74
|
get: function get() {
|
|
@@ -102,4 +108,6 @@ var _browserUtils = require("./browserUtils");
|
|
|
102
108
|
|
|
103
109
|
var _breachUtils = require("./breachUtils");
|
|
104
110
|
|
|
105
|
-
var _arrayUtils = require("./arrayUtils");
|
|
111
|
+
var _arrayUtils = require("./arrayUtils");
|
|
112
|
+
|
|
113
|
+
var _gpuUtils = require("./gpuUtils");
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = FullScreenPermission;
|
|
7
|
-
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
-
|
|
10
|
-
require("./full-screen-permission.scss");
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
|
-
var _reactBootstrap = require("react-bootstrap");
|
|
15
|
-
|
|
16
|
-
var text = _interopRequireWildcard(require("../constants/text"));
|
|
17
|
-
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function FullScreenPermission(_ref) {
|
|
23
|
-
let {
|
|
24
|
-
firstTimeFullScreen,
|
|
25
|
-
setFirstTimeFullScreen,
|
|
26
|
-
isFullscreen,
|
|
27
|
-
setFullscreen,
|
|
28
|
-
setFullScreenExitCount,
|
|
29
|
-
fullScreenPermissionTexts
|
|
30
|
-
} = _ref;
|
|
31
|
-
const [show, setShow] = (0, _react.useState)(true);
|
|
32
|
-
|
|
33
|
-
const closePermissionModal = () => {
|
|
34
|
-
if (firstTimeFullScreen) {
|
|
35
|
-
setFirstTimeFullScreen(false);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
setShow(false);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const handleNo = () => {
|
|
42
|
-
if (firstTimeFullScreen) {
|
|
43
|
-
setFullScreenExitCount(fullScreenExitCount => fullScreenExitCount + 1);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
closePermissionModal();
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const switchToFullscreenMode = () => {
|
|
50
|
-
closePermissionModal();
|
|
51
|
-
setFullscreen();
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
(0, _react.useEffect)(() => {
|
|
55
|
-
if (!isFullscreen) {
|
|
56
|
-
setShow(true);
|
|
57
|
-
}
|
|
58
|
-
}, [isFullscreen]);
|
|
59
|
-
const {
|
|
60
|
-
title = "",
|
|
61
|
-
message = "",
|
|
62
|
-
deny = "",
|
|
63
|
-
allow = "",
|
|
64
|
-
errorMessage = ""
|
|
65
|
-
} = fullScreenPermissionTexts;
|
|
66
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h1", {
|
|
67
|
-
className: "error-message"
|
|
68
|
-
}, errorMessage ? errorMessage : text.FULLSCREEN_ERROR_MESSAGE), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal, {
|
|
69
|
-
show: show,
|
|
70
|
-
onHide: closePermissionModal,
|
|
71
|
-
size: "lg",
|
|
72
|
-
backdrop: "static",
|
|
73
|
-
"aria-labelledby": "contained-modal-title-vcenter",
|
|
74
|
-
centered: true
|
|
75
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Header, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Title, null, title ? title : text.FULLSCREEN_PERMISSION_TITLE)), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Body, {
|
|
76
|
-
className: "dialog-message"
|
|
77
|
-
}, message ? message : text.MESSAGE), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Footer, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Button, {
|
|
78
|
-
variant: "secondary",
|
|
79
|
-
onClick: handleNo
|
|
80
|
-
}, deny ? deny : text.DENY), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Button, {
|
|
81
|
-
variant: "primary",
|
|
82
|
-
onClick: switchToFullscreenMode
|
|
83
|
-
}, allow ? allow : text.ALLOW))));
|
|
84
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactWebcam = _interopRequireDefault(require("react-webcam"));
|
|
13
|
-
|
|
14
|
-
var _reactBootstrap = require("react-bootstrap");
|
|
15
|
-
|
|
16
|
-
var text = _interopRequireWildcard(require("../constants/text"));
|
|
17
|
-
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
|
-
const FullScreenTestInWebcam = _ref => {
|
|
25
|
-
let {
|
|
26
|
-
webcamReference,
|
|
27
|
-
canvasReference,
|
|
28
|
-
userCount,
|
|
29
|
-
isWatching
|
|
30
|
-
} = _ref;
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Col, {
|
|
32
|
-
md: 6
|
|
33
|
-
}, /*#__PURE__*/_react.default.createElement(_reactWebcam.default, {
|
|
34
|
-
className: "canvas-video",
|
|
35
|
-
ref: webcamReference
|
|
36
|
-
}), /*#__PURE__*/_react.default.createElement("canvas", {
|
|
37
|
-
className: "canvas-video",
|
|
38
|
-
ref: canvasReference
|
|
39
|
-
})), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Col, {
|
|
40
|
-
md: 6
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement("canvas", {
|
|
42
|
-
id: "glanceTrackerCanvas",
|
|
43
|
-
style: {
|
|
44
|
-
display: "none"
|
|
45
|
-
}
|
|
46
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
-
style: {
|
|
48
|
-
position: "absolute",
|
|
49
|
-
marginLeft: "auto",
|
|
50
|
-
marginRight: "auto",
|
|
51
|
-
left: 0,
|
|
52
|
-
right: 0,
|
|
53
|
-
top: "35rem",
|
|
54
|
-
textAlign: "center",
|
|
55
|
-
zindex: 9
|
|
56
|
-
}
|
|
57
|
-
}, text.USER_COUNT_LABEL, ": ", userCount, /*#__PURE__*/_react.default.createElement("br", null), isWatching ? text.WATCHING_SCREEN : text.NOT_WATCHING_SCREEN));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
var _default = FullScreenTestInWebcam;
|
|
61
|
-
exports.default = _default;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = ResponseModal;
|
|
7
|
-
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactBootstrap = require("react-bootstrap");
|
|
13
|
-
|
|
14
|
-
var text = _interopRequireWildcard(require("../constants/text"));
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
function ResponseModal(_ref) {
|
|
21
|
-
let {
|
|
22
|
-
firstTimeFullScreen,
|
|
23
|
-
setFirstTimeFullScreen,
|
|
24
|
-
isFullscreen,
|
|
25
|
-
setFullscreen,
|
|
26
|
-
setFullScreenExitCount,
|
|
27
|
-
fullScreenMessage
|
|
28
|
-
} = _ref;
|
|
29
|
-
const [show, setShow] = (0, _react.useState)(true);
|
|
30
|
-
|
|
31
|
-
const closeResponseModal = () => {
|
|
32
|
-
if (firstTimeFullScreen) {
|
|
33
|
-
setFirstTimeFullScreen(false);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
setShow(false);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const handleNo = () => {
|
|
40
|
-
if (firstTimeFullScreen) {
|
|
41
|
-
setFullScreenExitCount(fullScreenExitCount => fullScreenExitCount + 1);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
closeResponseModal();
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const openFullscreen = () => {
|
|
48
|
-
closeResponseModal();
|
|
49
|
-
setFullscreen();
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
(0, _react.useEffect)(() => {
|
|
53
|
-
if (!isFullscreen) {
|
|
54
|
-
setShow(true);
|
|
55
|
-
}
|
|
56
|
-
}, [isFullscreen]);
|
|
57
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal, {
|
|
58
|
-
show: show,
|
|
59
|
-
onHide: closeResponseModal,
|
|
60
|
-
size: "lg",
|
|
61
|
-
backdrop: "static",
|
|
62
|
-
"aria-labelledby": "contained-modal-title-vcenter",
|
|
63
|
-
centered: true
|
|
64
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Header, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Title, null, text.FULLSCREEN_PERMISSION_TITLE)), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Body, null, fullScreenMessage), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Modal.Footer, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Button, {
|
|
65
|
-
variant: "secondary",
|
|
66
|
-
onClick: handleNo
|
|
67
|
-
}, text.NO), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Button, {
|
|
68
|
-
variant: "primary",
|
|
69
|
-
onClick: openFullscreen
|
|
70
|
-
}, text.YES))));
|
|
71
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
require("./audio-video-permission.scss");
|
|
11
|
-
|
|
12
|
-
var _blockedPermission = require("./blocked-permission");
|
|
13
|
-
|
|
14
|
-
var _initialScreen = require("./initial-screen");
|
|
15
|
-
|
|
16
|
-
var _newtonSchoolLogo = _interopRequireDefault(require("../../assets/images/newton-school-logo.png"));
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
const AudioVideoPermission = () => {
|
|
21
|
-
const isBlocked = false;
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
-
className: "container"
|
|
24
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
-
alt: "browser-permission-img",
|
|
26
|
-
className: isBlocked ? "background2" : "background"
|
|
27
|
-
}), /*#__PURE__*/_react.default.createElement("img", {
|
|
28
|
-
alt: "logo",
|
|
29
|
-
className: "logoImg",
|
|
30
|
-
src: _newtonSchoolLogo.default
|
|
31
|
-
}), isBlocked ? /*#__PURE__*/_react.default.createElement(_blockedPermission.BlockedPermission, null) : /*#__PURE__*/_react.default.createElement(_initialScreen.InitialScreen, null));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
var _default = AudioVideoPermission;
|
|
35
|
-
exports.default = _default;
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
height: 100%;
|
|
3
|
-
padding: 20px;
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
}
|
|
9
|
-
.background {
|
|
10
|
-
position: fixed;
|
|
11
|
-
left: 0;
|
|
12
|
-
right: 0;
|
|
13
|
-
top: 0;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
background-color: #7dc2ad;
|
|
16
|
-
z-index: -1;
|
|
17
|
-
}
|
|
18
|
-
.background2 {
|
|
19
|
-
@extend .background;
|
|
20
|
-
background-color: #ebac9c;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@media only screen and (max-width: 900px) {
|
|
24
|
-
.logoImg {
|
|
25
|
-
position: relative !important;
|
|
26
|
-
display: block;
|
|
27
|
-
top: auto !important;
|
|
28
|
-
left: auto !important;
|
|
29
|
-
margin-bottom: 20px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.imageContainer {
|
|
34
|
-
height: 300px;
|
|
35
|
-
width: 300px;
|
|
36
|
-
position: relative;
|
|
37
|
-
img {
|
|
38
|
-
position: absolute;
|
|
39
|
-
left: 0;
|
|
40
|
-
max-width: 100%;
|
|
41
|
-
max-height: 100%;
|
|
42
|
-
min-width: 100%;
|
|
43
|
-
min-height: 100%;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
.list_items {
|
|
47
|
-
margin-top: 40px;
|
|
48
|
-
}
|
|
49
|
-
.list_items li {
|
|
50
|
-
position: relative;
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: row;
|
|
53
|
-
align-items: flex-start;
|
|
54
|
-
counter-increment: order;
|
|
55
|
-
margin-top: 40px;
|
|
56
|
-
}
|
|
57
|
-
.list_items li:after {
|
|
58
|
-
content: "";
|
|
59
|
-
position: absolute;
|
|
60
|
-
margin-left: 6px;
|
|
61
|
-
width: 1px;
|
|
62
|
-
height: 100%;
|
|
63
|
-
background-color: rgba(16, 16, 16, 0.2);
|
|
64
|
-
}
|
|
65
|
-
.list_items li:last-child:after {
|
|
66
|
-
display: none;
|
|
67
|
-
}
|
|
68
|
-
.list_items li:before {
|
|
69
|
-
content: counter(order);
|
|
70
|
-
z-index: 1;
|
|
71
|
-
display: flex;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
align-items: center;
|
|
74
|
-
width: 20px;
|
|
75
|
-
height: 20px;
|
|
76
|
-
border: 1px solid rgba(16, 16, 16, 0.2);
|
|
77
|
-
border-radius: 50%;
|
|
78
|
-
margin-right: 20px;
|
|
79
|
-
font-size: 12px;
|
|
80
|
-
font-weight: bold;
|
|
81
|
-
line-height: 1;
|
|
82
|
-
color: rgba(16, 16, 16, 0.8);
|
|
83
|
-
background-color: #fff;
|
|
84
|
-
box-shadow: 0 0 0 2px #fff;
|
|
85
|
-
}
|
|
86
|
-
.imageTransition:hover {
|
|
87
|
-
animation: hideImage 0.5s ease-in-out;
|
|
88
|
-
animation-fill-mode: forwards;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
@keyframes hideImage {
|
|
92
|
-
from {
|
|
93
|
-
opacity: 1;
|
|
94
|
-
}
|
|
95
|
-
to {
|
|
96
|
-
opacity: 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
.box {
|
|
100
|
-
width: 400px;
|
|
101
|
-
height: 600px;
|
|
102
|
-
border-radius: 20px;
|
|
103
|
-
background-color: rgb(255, 255, 255);
|
|
104
|
-
box-shadow: 5px 10px 8px rgba(60, 60, 60, 1);
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
}
|
|
108
|
-
.videoStyles {
|
|
109
|
-
border-top-left-radius: 20px;
|
|
110
|
-
border-top-right-radius: 20px;
|
|
111
|
-
}
|
|
112
|
-
.messageContainer {
|
|
113
|
-
flex: 1;
|
|
114
|
-
padding: 20px;
|
|
115
|
-
}
|
|
116
|
-
.ripple {
|
|
117
|
-
position: relative;
|
|
118
|
-
flex: 1;
|
|
119
|
-
padding: 20px;
|
|
120
|
-
border-top: 1px solid rgba(0, 0, 0, 0.24);
|
|
121
|
-
button {
|
|
122
|
-
width: 100%;
|
|
123
|
-
background-color: #2b189b;
|
|
124
|
-
padding: 10px;
|
|
125
|
-
color: #ffffff;
|
|
126
|
-
border: none;
|
|
127
|
-
border-radius: 10px;
|
|
128
|
-
font: inherit;
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
outline: inherit;
|
|
131
|
-
position: relative;
|
|
132
|
-
font-size: 18px;
|
|
133
|
-
}
|
|
134
|
-
button::before {
|
|
135
|
-
animation: ripple 1.5s ease-out;
|
|
136
|
-
animation-iteration-count: infinite;
|
|
137
|
-
background-color: inherit;
|
|
138
|
-
border-radius: inherit;
|
|
139
|
-
content: "";
|
|
140
|
-
height: 100%;
|
|
141
|
-
left: 50%;
|
|
142
|
-
position: absolute;
|
|
143
|
-
top: 50%;
|
|
144
|
-
transform: translate(-50%, -50%);
|
|
145
|
-
width: 100%;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@keyframes ripple {
|
|
150
|
-
0% {
|
|
151
|
-
height: 100%;
|
|
152
|
-
opacity: 0;
|
|
153
|
-
width: 100%;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
25% {
|
|
157
|
-
height: calc(100% + 8px);
|
|
158
|
-
opacity: 0.4;
|
|
159
|
-
width: calc(100% + 8px);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
50% {
|
|
163
|
-
height: calc(100% + 12px);
|
|
164
|
-
opacity: 0;
|
|
165
|
-
width: calc(100% + 12px);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
75% {
|
|
169
|
-
height: 100%;
|
|
170
|
-
opacity: 0;
|
|
171
|
-
width: 100%;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
to {
|
|
175
|
-
height: 100%;
|
|
176
|
-
opacity: 0;
|
|
177
|
-
width: 100%;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
.flexBox {
|
|
181
|
-
display: flex;
|
|
182
|
-
width: 100%;
|
|
183
|
-
}
|
|
184
|
-
.heading {
|
|
185
|
-
font-size: 20px;
|
|
186
|
-
font-weight: bold;
|
|
187
|
-
text-align: center;
|
|
188
|
-
}
|
|
189
|
-
.description {
|
|
190
|
-
margin-top: 20px;
|
|
191
|
-
text-align: center;
|
|
192
|
-
font-size: 14px;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.description_listing {
|
|
196
|
-
@extend .description;
|
|
197
|
-
margin-top: unset;
|
|
198
|
-
font-weight: 400;
|
|
199
|
-
margin-bottom: 20px;
|
|
200
|
-
font-size: 16px;
|
|
201
|
-
max-width: 90%;
|
|
202
|
-
text-align: start;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.logoImg {
|
|
206
|
-
position: fixed;
|
|
207
|
-
left: 20px;
|
|
208
|
-
top: 20px;
|
|
209
|
-
width: 200px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.boxLarge {
|
|
213
|
-
@extend .box;
|
|
214
|
-
height: auto;
|
|
215
|
-
padding: 20px;
|
|
216
|
-
}
|
|
217
|
-
.urlHighlight {
|
|
218
|
-
width: 300px;
|
|
219
|
-
border-radius: 10px;
|
|
220
|
-
padding: 6px;
|
|
221
|
-
border: 1px solid rgba(16, 16, 16, 0.4);
|
|
222
|
-
img {
|
|
223
|
-
max-width: 100%;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
.near_full_width {
|
|
227
|
-
max-width: 90%;
|
|
228
|
-
}
|