Supervisor SDK
The JavaScript library is a software client of the proctoring system. It can be used for integration with an e-learning system.
How to use
An example of using with JWT authorization:
<script src="https://your-proctoring-server/sdk/supervisor.js"></script>
<script>
  // create Supervisor instance
  var supervisor = new Supervisor({ url: 'https://your-proctoring-server' });
  // log in and initialize the session
  supervisor
    .init({
      // set your provider name
      provider: 'jwt',
      // get JWT string from your server
      token: fetch('/api/token').then(function(response) {
        if (response.ok) return response.text();
        else throw Error('Failed to get JWT');
      })
    })
    .then(function() {
      // start the session only after initialization
      return supervisor.start();
    })
    .then(function() {
      // start testing in the e-learning system here
    })
    .catch(function(err) {
      // show alert with an error
      alert(err.toString());
      // redirect to home page
      location.href = '/';
    });
  // stop the session after testing in the e-learning system is over,
  // the timeout function is used here as an example
  setTimeout(function() {
    // stop the session
    supervisor.stop()
      .then(function() {
        // log out the session
        return supervisor.logout();
      })
      .then(function() {
        // your action here after the successful completion of the session
      });
  }, 5 * 60 * 1000); // 5 minutes
</script>
Do not forget to change "your-proctoring-server" to your dedicated instance of the proctoring server.
Requirements and limitations
For correct operation of the system required to comply with the minimum system requirements listed below.
| Parameter | Minimum requirement | 
|---|---|
| OS | Windows 7, macOS 10.12 "Sierra", Linux | 
| Browsers | Chrome 72, Opera 59, Firefox 66, Edge 79, Safari 12 | 
| Mobiles | Android 4.4 (Chrome), iOS 13 (Safari) | 
| Required protocols | HTTPS, WebSockets, WebRTC | 
| CPU | 2 cores | 
| RAM (free) | 1 GB | 
| Network bandwidth | 256 kbps | 
| Camera | 640x480, 15 fps | 
| Microphone | required | 
You should also consider the following limitations:
- 
Your e-learning system must be hosted on a server with valid SSL certificate (via HTTPS protocol). Otherwise the video and audio capture will not work. 
- 
Your web page with SDK should not be fully reloaded while the library is running. For example, when switching between test questions. If the reload occurs in less than a minute, the proctoring results will not be saved.