new Supervisor(options)
The constructor of Supervisor class.
It is recommended to use only one instance.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Basic options of Supervisor.
Properties
|
Example
var supervisor = new Supervisor({ url: 'https://your-proctoring-server' });
Type Definitions
Metrics
Schema of metrics.
Each metric is in the range from 0 to 100.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
b1 |
number | Browser is not supported. |
b2 |
number | Focus changed to a different window. |
b3 |
number | Full-screen mode is disabled. |
c1 |
number | Webcam is disabled. |
c2 |
number | Face invisible or not looking into the camera. |
c3 |
number | Several faces in front of the camera. |
c4 |
number | Unidentified face in front of the camera. |
c5 |
number | Found a similar profile. |
c6 |
number | Face does not match the profile. |
k1 |
number | Atypical keyboard handwriting. |
m1 |
number | Microphone is not working or its volume is low. |
m2 |
number | Conversation or noise in the background. |
n1 |
number | No network connection. |
n2 |
number | No connection to a mobile camera. |
s1 |
number | Screen activities are not shared. |
s2 |
number | Second display is used. |
Payload
Schema of payload.
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
iat |
number |
<optional> |
Issued at (seconds since UNIX epoch). |
exp |
number |
<optional> |
Expiration time (seconds since UNIX epoch). |
username |
string | Unique user ID (format /^[A-Za-z0-9_-]+$/). | |
role |
string |
<optional> |
User's role ("student" or "proctor"). |
lang |
string |
<optional> |
UI language, e.g. "en". |
nickname |
string |
<optional> |
Visible name of the user. |
group |
string |
<optional> |
User group. |
labels |
Array.<string> |
<optional> |
Additional user data for searching. |
referrer |
string |
<optional> |
Referrer page. |
identifier |
string | Unique session ID (format /^[A-Za-z0-9_-]+$/). | |
template |
string |
<optional> |
Template ID for the session. |
subject |
string |
<optional> |
The name of the session. |
timeout |
number |
<optional> |
The session timeout in minutes after which it should be stopped (integer). |
lifetime |
number |
<optional> |
The session lifetime in minutes after which it should be stopped (integer). |
expires |
number |
<optional> |
Number of days to keep records (integer). |
openAt |
Date |
<optional> |
Date and time until which the session cannot start (ISO-8601). |
closeAt |
Date |
<optional> |
Date and time after which the session will automatically end (ISO-8601). |
members |
Array.<string> |
<optional> |
A list of proctors to add to the members in the session. |
metrics |
Array.<string> |
<optional> |
A list of metrics in the session. |
weights |
Array.<number> |
<optional> |
A list of weights for the metrics. |
addons |
Array.<string> |
<optional> |
A list of addons in the session. |
threshold |
number |
<optional> |
The threshold value of the credibility for automatic conclusion and notification of the participant. |
locale |
string |
<optional> |
The PDF report language, e.g. "en". |
timezone |
string |
<optional> |
The PDF protocol time zone, e.g. "Europe/Berlin". |
rules |
string |
<optional> |
URL of a page with a rules of the event. |
url |
string |
<optional> |
URL of a test page. |
api |
string |
<optional> |
API address to send results for this session to another server. |
tags |
Array.<string> |
<optional> |
Session tags for searching. |
eventHandler(dataopt)
Callback function for message event.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Object |
<optional> |
Data of event. |
Events
error
Error saving session data (metrics or faces).
face
A photo of the face was taken. The image is saved in JPEG format.
Properties:
Name | Type | Description |
---|---|---|
dataUrl |
string | Face image in base64. |
file |
File | Face image as file. |
similar |
Array.<string> | List of similar persons. |
verified |
boolean | The face of one person or not (compared with profile). |
metrics
The metrics of user behavior are obtained.
Properties:
Name | Type | Description |
---|---|---|
metrics |
Supervisor~Metrics | Data of detected metrics. |
violated |
boolean | Violation detected or not. |
start
The session was started.
The session can be started by student.
stop
The session was stopped.
The session also can be stopped by timeout or by proctor.